As Kit says in their comment the screen itself can't distinguish from 10 people using all five digits on one hand and 50 people using a single finger.
What you'll have to do is work out some way of grouping the touches into a single user's interaction. This could be proximity in distance - all touches within a couple of centimetres of each other are likely to be from a single user - however that doesn't help if people can move their hands past each others. It could also be proximity in time - if the touches are within (say) 500 milliseconds of each other then it's likely it's the same user.
A third alternative would be to have specific locations on the screen that the users touch (on screen controllers, avatars etc.). With this approach you "know" that all touches within this area are from a single user.
Making your game turn based so only one player is touching the screen at any one time might help - if only to allow them physical access to the screen - but this might not be compatible with the game modes you require.
Perhaps the best approach would be to use a combination of these.