Calculating water flow rate based on the pulses counted