WELCOME TO FISHLORE!
You are right, a school of any fish with 6 or more would be too much for a 5 gallon tank.
The rule of thumb is 1 inch of adult size per gallon, for your tank you could have 2 of the minnows, 3 would just put you over, but with water changes it would probably be ok. I think a nice school of fish looks better in a tank of at least 30 gallons, where they can have more swimming room, and you can have a real school. You could have 9 minnows, or neon tetras, and 3 corys in a 30 gallon.
Were you going to cycle the 5 gallon with the minnows, then get something else, or is that your fish of choise for this tank?