Hard to say.
It's an undersized tank but the cichlids will fare better in larger groups. If the aggression gets worse you may need to add more (and if that is the case add 4 at a time to diffuse any aggressive behavior aimed at the newcomers, which is likely; you coul probably double the quantity, if you had a 55gal 10-15 would be a good sized group). However if the 40gal works with the fish you have keep the quantity where it is.
It's an undersized tank but the cichlids will fare better in larger groups. If the aggression gets worse you may need to add more (and if that is the case add 4 at a time to diffuse any aggressive behavior aimed at the newcomers, which is likely; you coul probably double the quantity, if you had a 55gal 10-15 would be a good sized group). However if the 40gal works with the fish you have keep the quantity where it is.