Pulse Counter possible?

Hi,
I try to use OpenMQTTGateway on my ESP32 Low energy and battery driven modules as a pulse counter for water measuring.

I have taken a look at this project, because it has already DeepSleep functions build in.
My problem is, that I cant find information to use it as a pulse counter. Maybe I need a other search term to find the right information (sorry my English is not the best)??

Regards,
Thomas