At least three or four mollies should be kept together. Mollies are shoaling fish, which means they’re more comfortable living with fish of the same species.
While you should keep several mollies together, be sure not to overcrowd the tank. A single molly fish needs approximately three gallons of water to swim freely, so a 10-gallon tank can hold a small group of three mollies comfortably.
Additionally, you should keep more female mollies than male mollies, as male mollies tend to be more aggressive. They can chase females to mate or even chase other males to establish their dominance.
To minimize aggression in your tank, try to keep a ratio of three females to each male molly.