The maximum number of players allowed in GTA 5 is 16. If you want to play with more than 16 players, you will have to use a mod or hack to play with more than 16 people.