From :
http://www.chemteam.info/Thermochem/MixingWater.html
Mixing water formula: Qh*(Th-Tf)=Qc*(Tf-Tc)
Where:
Qh = Quantity of hot water
Qc = Quantity of cold water
Th = Temp of hot water
Tc = Temp of cold water
Tf = Final Temperature
Simple logic can also get you there:
Assume the cold water is at 38, 100% exchanger efficiency and 10G as the wort volume.
Heat exchanging 10G of cold water with the 10G of wort will reduce the temp to (212+38)/2 = 125
Heat exchanging 10G of cold water with the 10G of already cooled wort will reduce the temp to (125+38)/2 = 82
Heat exchanging 10G of cold water with the 10G of further cooled wort will reduce the temp to (82+38)/2 = 60
This example requires 30G of 38 degree water to do the job and that's ALWAYS having 38 degree water as the heat sink. If you try to recirculate your cooling water, it won't be anywhere near 38 degrees and therefore will take much longer and you'll hit equilibrium depending on cold water volume so you may never hit your target. It would be initial cold water volume dependent.