There are many reasonable questions to ask before having sex with someone: whether that person has been tested, if they want to have sex, what they are into.
How many people they've slept with is not one of them.
Not only is this question invasive, but it is also loaded with assumptions about socially acceptable expressions of sexuality. Not surprisingly, these assumptions ultimately judge women more harshly than men.