You can keep 5 female bettas in a 20-gallon tank. If the tank is well cycled and maintained, you can keep a slightly higher population of female bettas. The main problem of betta sorority tanks is aggression, which you can address by adding plenty of plants, rocks, and driftwood into the tank.
37