Hi,thanks for query.You might be having varicocele
.This can affect the sperm count
and its quality.In your case as you are already having problems it is better to take second opinion from urologist
and then as per his advise you need go for surgery for this.For infection you need to take a course of antibiotics.
wishing you good health.