Counting pulses

I have an mcp23017 with a sensor for a watermeter.
I would to use the counter option in helpers.
Where can I set which input must been used.

Input of what?

How are you connecting the sensor to Home Assistant?