How many times can you have sex until you get pregnant?
This is an unusual question, and I'm not sure if you intended to ask this literally, but let's see...
There is no set number -- minimum or maximum -- of times you can have sex before you get pregnant. A woman can have sex and get pregnant the first time she does it. A woman could have sex thousands of times and never get pregnant. It depends on the circumstances, and bear in mind nature usually favors the circumstances for a woman to conceive.
If you take a group of 100 women of child-bearing age and normal fertility and cycles and tell them to regularly engage in sexual intercourse without using some kind of contraception, 85 of those women will be pregnant within 12 months. The other 15 women will either take longer to get pregnant, or possibly not get pregnant at all. but this is just a statistic, and it's very general. Whether or not a woman gets pregnant during sex depends on his fertility, her fertility, conditions inside her body, whether or not she's ovulating as well as many other factors.
It may sound like a lot to do with a lot of potential to go wrong, but nature favors us to reproduce. Given there are 6.1 billion people on this earth, it's a formula that's worked pretty well to keep the human race going. It's true that not all conceptions make it to live birth. Only about 1 in 3 conceptions will result in pregnancy. But that's still enough to say that anytime you have sex without contraception, there is a risk of pregnancy.
So if you're asking your question in the context of, "How many freebies do I get before I have to answer for some consequences?" then the answer is that there are no freebies. If you want to have sex, and you do not want to get pregnant, then you need to use some kind of birth control. The basic latex condom is cheap, easy and highly effective when used correctly. Back that up with some properly administered hormonal birth control (but only if it's right for your body), and you're going to have nearly 100% protection against unwanted pregnancy.
Read all about reproduction and get the low-down on birth control in these articles.