Depending on the number of numbers of team members we can know how many teams there would be.
We will also know when everyone is on a team.
Taking out the divisors of 24:
12, 8, 6, 4, 3, 2
If they are teams of 12 people, it would be 2 teams.
If they are teams of 8 people, it would be 3 teams.
If they are teams of 6 people, it would be 4 teams.
If they are teams of 4 people, it would be 6 teams.
If they are teams of 3 people, it would be 8 teams.
If they are teams of 2 people, it would be 12 teams.