How many years of masterbating will reduce your sperm count?

It won't. Sperm regenerates until you die. Masturbation over a period of years will not reduce long-term sperm production.