Short answer: They're antenna(s) for the onboard VHF radio(s).
Airplanes aren't actually required to have radios. But, if you want to fly into certain classes of airspace, you must have at least one VHF radio on board, to communicate with air traffic control. A lot of planes (in fact, I would say the majority of them) actually have two radios installed. Thus, you see planes with zero, one, or two antennas.
Having two radios has several advantages, beyond just the obvious "backup in case one fails" advantage. Most often, one will be used to listen to the ATIS/AWOS/ASOS or other automated information broadcast while the other is used to keep in touch with ATC. You could also use the second one to contact Flight Services, or (if you're charter/commercial) keep in touch with your company (although that last one is getting more and more likely to be done with a cell phone or the internet).