In both the conditions the temperature of testes goes up. The cooler environment of about 2 degree Celsius less, in the scrotum no longer remains and temperature goes up. That may hamper sperm production, the spermatogenesis. Sometimes, during the surgery in that area, there may be trauma to the sperm carrying system or to the testis itself. Patients having already less sperm production may take the plea of injury as a cause, and sue the doctor in court of law for compensation. So, in view of the above problem, it is always desirable to take history of siblings and order for a sperm count before the surgery. That may help the doctor to asses the reproductive status of a male patient and may not leave any room for future litigation.
One testis is enough for sperm production and fertilization. I have seen people having huge hydrocele in this part of the world and at the same time having more than one child.