Any number of teams can work very well. For very small groups we would tend to suggest different formats to keep up the atmosphere of fun competition.
It can be difficult for every team to feel involved if there are more than 30 teams, but we have run big corporate quiz events for 50+ teams, and we have ways of ensuring that everyone has a great time.