Well, it entirely depends on the circumstance of the family and the characteristics of the sons in question. If the family has tons of land and multiple holdings, there’s ways to spread the wealth around without diluting the family’s power – at the extreme, you can create a cadet branch; one step down from that, you can probably hand out landed knighthoods; one step down from that, you can give out positions as castellans and master-at-arms and the like.
If the family doesn’t, then you need to find different occupations for younger sons – if you’ve got influence with your liege lord and/or the royal court, you might try to get one a position as a courtier, both because that gives them a living and royal favor is one way to get your hands on land if you’re not born with it; if you’ve got money, you could send your son to be trained as a maester at the Citadel, which is a decent living and has a good amount of political influence, and I’ll bet gets you either a free maester or a discount because the Citadel wants to get literate novices who know how to behave around highborns; if you don’t, you can send them to become a Septon, where they could rise in the Faith’s hierarchy.
But in both cases (land/not), it depends on the characteristics of the sons – a son who’s a good fighter makes for a good castellan or could get farmed out as master-of-arms or household knight at a more powerful House, but if your son can’t swing a sword to save their life, those options are foreclosed. Likewise, if your son is thick as a castle wall, he’s probably not going to be welcome at the Citadel, and if he’s a notorious drunk and lecher, the Faith might turn their noses up at him. Likewise, you run into problems with redundant skill-sets: what happens if you have two younger sons who’re good fighters and only one opening? The youngest might have no option but to become a hedge knight or join the Night’s Watch.
So rather than a single ideal number, it depends very much on the circumstances.