I have a Singapore e-visa that expires on May 9. I want to enter on May 5 and stay for 10 days. I have read that normally passports are stamped for a 30 days stay. I would like to know if that would likely be the case, or if I'd only be allowed to stay for 4 days because of the visa expiration.
It's a bit vague from what I found, but you may be granted a stay beyond the validity of your visa (provided you show proof of return)
According to an FAQ from their ministry of foreign affairs (emphasis mine):
How long can I stay in Singapore with a valid e-Visa?
A holder of a valid Singapore visa who is found suitable for entry into Singapore will be issued with an immigration pass to enter and remain in Singapore. You are advised to check your passport for the arrival visit pass endorsement when in Singapore and take note of the period of stay granted before leaving the checkpoint. The period of stay granted is shown on the visit pass endorsement given on your passport and it is not tied to the validity of your visa.
Additionally, a little more information on visa validity comes from this Singapore tourism website
14. What is the difference between visa’s validity and the maximum allowed stay in Singapore?
Please bear in mind that the duration of each stay in Singapore cannot exceed 30 days, i.e. every time you are entering the country your passport will be accordingly stamped allowing to remain for (usually) 30 days.