In the games, a trainer can have up to 6 Pokemon in their party, and numerous more in their PC Boxes, depending on the game. Typically the anime rarely ever depicts a trainer with more than six at any given point but the manga is an interesting case. To quote from Bulbapedia,
> In Pokémon Adventures, there are technically no limits to how many Pokémon a Trainer can have on hand beyond what the Trainer can physically carry. However, Trainers are still limited to a maximum of six Pokémon for official battles, such as in the Pokémon League.
The anime is sometimes can be confusing or inconsistent but typically it's six Pokemon