Is there a test you can take to tell exactly how many guys a girl has had sex with?
No, there is not.
The only thing you can do is to ask your partner -- giving you're willing to be forthright and share the same information about yourself -- and take her word for it.
If you're asking this because of concerns about sexually transmitted infections , understand that knowing how many partners a potential or current partner has had doesn't offer any protection at all. Someone can get an STI from their first partner just as easily as they can from their twentieth. In order to reduce your risks of STIs, what you and any partner need to do is to practice safer sex . That means at least six months of monogamy (only being with each other sexually), latex barriers during those six months for any genital-genital or oral- genital sex , and TWO full STI screens for you both, with negative results, before ditching those barriers.
If this is (or is also) about a trust issue, then that's also something you have to cultivate: trust doesn't just happen. If you don't feel you can trust a partner enough yet to feel pretty confident in their honesty, then by all means, hold off on sex with them until you two have grown some more trust between you. Trust is a pretty important part of any relationship , even those that are primarily sexual , so if you're distrustful of someone -- to the point that you're looking to test them to find out how many partners they've had, rather than just asking -- that's going to be an issue you need to deal with, and invest some time and energy in.
If this is an issue of insecurity -- a la, you are worried about a partner having sexual experience when you've got less or none -- really, don't sweat it. When we're wise, we know that every new partner is like a first partner, in that we need to sort of learn all over again how to do things, because everyone has different preferences and sexualities. Often enough, one partner is going to have more sexual experience while another has less, or have more or less partners than the other: that's nothing to worry about.
Lastly, if this is a social issue -- as in, you don't want to be with someone who has had any other partners or who has only had a given number of partners -- understand that while, by all means, you get to have those preferences, they can be a real blockade to good relationships and healthy sexuality. What if a great love of your life has had more partners than you like, but someone with whom you'll have a more lackluster relationship has had the "right" number? Is that a good trade-off? Probably not. If you like someone, part of what you like about them is their life history, because our life histories are part of what make us who we are. Certainly, there are some crummy ideas floating out and about in terms of people making character judgments about others (especially when we're talking about sex and women: women are judged far more harshly in this regard), but they're based in some things that you probably really don't want to sign onto or enable: sexism , ignorance about disease, ignorance about sexuality, the idea of people as property, the works.
By all means, again, if you have concerns about sexual history, open up to your partner or potential partner and talk about them openly and with sensitivity : everyone gets to feel conflicted or uncomfortable about whatever they feel that way about. For all you know, she's having the same concerns herself. Just be sure and check in with yourself, as well, to figure out what your concern is, where it's coming from, and how much it's about a partner, and how much is instead about you.