This question is the one single item you should avoid at all costs
First off, it really is none of your business. Yes, you can ask items like, "Did you have unprotected sex?", but the numbers are not important. Whether it's zero or ten thousand, you're with that person because of who they are, and that includes the lessons they learned when they had other relationships.
Knowing how many other folks your partner slept with will not bring you closer. Actually, it tends to cause rather major rifts. You may think you can "handle it" but knowing how many other folks were there before you will start things rolling around in your brain, such as, "I wonder how I compare to X," or "I wonder if my insert significant other here ever thinks of X when we make love." Men in particular have difficulties with knowing others were with their true love... perhaps it's cultural. Women are supposed to be virtuous, and men are supposed to be worldly lovemaking machines.
Sometimes this cannot be helped. I've known my wife since we were 14. I've always been around when she broke up with one of my friends. I know almost every other person she's slept with. She let me read some of her journals once, to which I can say to you avoid doing so at all costs. Fifteen years into our marriage I still get those "what if?" questions popping up every so often. I know she still has real difficulties with two of my former girlfriends, and I still cannot mention the name Mariah in front of my wife.
Sometimes ignorance is bliss. From personal experience, I highly recommend you be as blissful as you can when this question comes up. If you are asked about your sexual history, be vague and tell them that they are the one single person for you, so the others just don't matter.