Hi, I want to assure you,
masturbation itself will not cause any reduction in
sperm count and
infertility. I can understand that you are worrying about your potency, because even after several attempts of
unprotected intercourse your girlfriend didn't become pregnant. If i had a patient with similar situation i would suggest the following probable options or reasons for intercourse which did not leads to pregnancy.
1. The fertile period for a girl is usually between 12-16th days of her menstrual cycle.Probably you could have had sex with her during the non fertile period
2.Few of your girlfriend's themselves may have some difficulty in formation of ovam which is necessary for union of your sperm to become pregnant
3. Finally i suggest you to check your sperm analysis after consulting a gynecologist or
Urologist. They will look for your sperm count, motility of your sperm and few others. You should have at least 40 million sperms and 40% motility to make pregnant.
There are several options available in this advanced scientific era, and hope you will find a solution based on these options.