Well, yes and no. Nobody wants to be that guy marrying a girl who slept around when younger to compensate some issues, 'discover herself' or whatever was the justification, if there even was one. I can imagine it should be the same from the other side, but for some reason that's not always the case. Also from health perspective you play statistics game with plethora of bacteria, amoebes and viruses that can easily make you infertile or get a cancer few decades down the road.
The thing is, people don't change. They evolve, slowly, over long time as life brings whatever it brings. But bad people don't become good. A guy fucking everything that moves ain't gonna become that dream father of your kids that you can rely on anytime, especially through tough times (and they always come, one of few sure things in life).
There can be multiple good reasons why anybody in their late 30s had only 1 or two partners before and they would be a great partner for rest of life. I am struggling to find a single reason how opposite would be considered a good scenario and any kind of advantage, rather just massive warning signs.
Personally, I'd say 5-10 and not more. Whatever lesson you need to get from relationships, it will be covered. After that, unless people are not already emotionally dead inside, its just heading in that direction step by step. Everytime you fall in love and breakup, a bit of your heart is not coming back (which is not bad per se, scars tell our stories and should give us some valuable lessons, but those lessons should be learned from).
And fucking around for fucking around sake or chasing some numbers nobody cares about is plain immature and stupid. Identify what you are compensating for, fix the underlying problem, there is always one and its usually some unresolved crap from childhood, missing good father figure or similar. Its not great and glorified like some teen movies may make you believe, but pretty consistently a sad picture with all corresponding consequences.
You don't have to trust a random internet stranger, over time you will see plenty of this around you in some form as you grow older, just look for it.