No, masturbation does not affect sperm counts.
However, frequent masturbation and use of pornography while masturbating, can risk you for Erectile Dysfunction in future. You must learn a correct technique of masturbation from an expert.
Next Steps
Kindly consult with a sexologist in detail. For more information regarding this problem you can ask a detailed query here on practo.