First of all the question
How many postgraduate programs should I apply to?
is not possible to answer objectively; it is as subjective as it gets. Ultimately it would depend on the type of person you are, on the possibilities you have available to you etc etc. My short answer would be: apply as many as you like...
What is a good number of PhD positions to apply for?
is also a bit tricky, but somewhat better. There are no clear cut numbers and threshold, AFAIK. I would definitely send out more than one! If your problem is that your list is too long, prioritise. Rank these places based on factors relating to as well as besides scientific reasons, such as location, cost of living, weather, any cultural aspects etc etc.. When you have a ranked list, rather than a plain list, you can start from the top and work your way down. (OR: start from the bottom, to gain some experience as you work your way up to list. This was an advice I was given by a head hunter once, his advice was to divide the list of companies I was interested in to three tiers and start from the lowest one). In any case I would suggest that you take your time with each application and go with quality over quantity (more on this a little further down). If the applications you send out come back negative, continue from the list.
About sending multiple applications out; the important thing there is that you don't want to come across as a wholesale applicant sending boilerplate mails or applications to anyone and everyone in the field, even if that's not the case.
For example, it's probably a good idea to not apply for several different positions in the same department with the same type of application. Research environments aren't that big (at least in Europe), PIs that work in similar fields typically know and talk to each other. So if you don't leave a good impression with one, you might be off to a bad start with another one.
Now that being said, it does not have to be a negative thing, as a matter of fact you can turn that to an advantage even. I applied for two postdoc positions at the same institute, turned out these two labs were very well connected. I did my interviews for both groups together, and they even helped me choose between the positions. Important thing is to be transparent about it.
Finally, I think there are plenty of questions here on Academia.SE that address these type of issues actually. Feel free to do a search for