Hi , yes heat can effect sperm count. While masturbating we can’t conclude your sperm counts are low. Go for a semen analysis test.
With good diet, exercise you can increase it.
Add antioxidants food, more Almonds, eggs , broccoli in your diet
Next Steps
Nothing much to worry, go for semen analysis test
Health Tips
Check my YouTube channel- Tandon’s Clinic. I have given home made remedies- Ashwagandha milk. It will help you.
Thanks