Ear infections are generally minor infections, and there are many children whose ear infections will resolve without any treatment. When children get into a cycle of having repeated ear infections one begins to worry about problems with diminished hearing, or scarring of the ear drums. The first way to address this problem is to try and prevent further ear infections. Just as your physician suggested, we give these children a low dose of an antibiotic to take once a day to prevent bacteria in the middle ear from growing and causing another infection.
Usually, children will be on these prophylactic antibiotics for a few months, or through the winter, when children are more prone to having ear infections as a complication of a cold. For most children this works quite well, and they do not have any ear infections. The antibiotics that we usually use are common ones like Amoxicillin, rather than the broad spectrum antibiotics. There is definitely some concern about building up resistance to antibiotics if you use stronger ones than you need to.
So how many ear infections are too many? In general, if a child has three ear infections in six months, or four in a year, physicians would consider starting that child on prophylactic antibiotics. It is important to determine if the ear infections are truly separate infections, however. With your son having 3 episodes in such a short time, I definitely would wonder whether they were all distinct ear infections or if one or two of them never cleared.
A small percentage of children will continue to have frequent ear infections, even on the prophylactic antibiotics, and they may need other treatment such as having tubes put in the eardrum.