Using the count of a hall effect flow sensor

Okay so I want to use this flow sensor I have to essentially cut off a pump I have hooked up to a relay once it reaches a certain count. I'm just not really sure how to go about this. I'll attach a link to the flow sensor I have. Any advice on where to start or how to execute this would be greatly appreciated.

https://www.amazon.com/gp/product/B018U5ROV4/ref=s9_acsd_simh_hd_bw_b3UzrhT_c_x_w?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-3&pf_rd_r=VJATQR3MP2J0FP2FPDFE&pf_rd_t=101&pf_rd_p=0cdd08fd-9f73-5d0d-a532-cf329cbf8554&pf_rd_i=3206433011

All hall effect flow meters are essentially the same, and so is the code. Since you are not interested in rate, the matter is greatly simplified, and you can strip down the code below. Your only problem is finding out what “Q” means. perhaps you can do that by calculating against a known quantity.