How often does a guy has to masturbate to get a girl pregnant?

It won't. To get pregnant, the guys sperm needs to somehow enter a girl's vagina. No matter how often he does it, if a guy is masturbating alone, he won't get anybody pregnant.