It depends on what species you want to keep. Some require a large male to female ratio to spread aggression. This would be the aggressive cichlids like Auratus, Pseudotropheus crabro, Pseudotropheus johannii,

If you only want fish that stay in the 4-6" range and none of the much bigger cichlids like Venustus then about 35 fish is maximum. They will still need to be in groups of male and females though to spread aggression from a single male over multiple females. Having all males is a challenge and requires without exception another tank setup, cycled and ready to go, to remove bullied fish.