yer id say 4 as my current 10g has 8 fish in total, although i will point out be carefull with male and females because if they start breeding in a 5g tank your going to be well overstocked and fast
Also, I've had female guppies reach 3 inches so go with males because they're more colourful and smaller. As for the question, I agree with 4 being safe number of males for 5 gallon.