What you need is some sort of programmable flow meter. I use one of these:
Mind you, I got it for free from work. They are around $370 new. Maintenance threw it away.
I pulled it out of the trash, took it apart, put it back together and it worked. It has 1/2"NPT fittings,
so I...