How to use a water flow device with the arduino

I'm planning on buying this water flow device: I would like to know what code should I use to measure the volume of the water that is going through the sensor, so that when it reaches a certain value, a switch will turn off the water pump, so that no more water will be used. I need the water flow to stop when it reaches a certain volume, so please tell me what to do. Thanks in advance!

You should try reading the replies to your threads. Not only would you have your answer you'd also save $3.

Well, the sensor has a formula for water volume flow based upon output frequency. So the short answer is:

Decide how many counts corresponds to the volume of water you want. Turn on the water. Count until desired counts are reached. Turn off the water.