I have a 10g with mollies and they do just fine
You have to go by your own judgement on if they are happy in the tank, healthy, etc. The guy at petco told me you could have 50 fish in a 10 gallon but you'd be doing water changes every hour. So with that being said; it's the maintenance
Taylor