Here some pictures of my watermeter for Domoticz. I use two CNY 70 (Reflective couplers) instead of one like in most other designs. With only one sensor you'll always get spurious pulses one day..... I use a ESP8266-01 to communicate by Wifi with Dz. So no wires between RaspberryPi and watermeter! Adjusting is made easy with two green LED's. They will light if there is reflection. A blue LED will light when a pulse is send to the ESP8266.

With some logic inside a PIC i create a pulse-output which is connected to a GPIO of the ESP8266.
The ESP8266 runs ESPEasy software. I'm still able to see the readings on the meter with this shape of board.

Two CNY 70 reflective sensors:


The board needs 5V power which can be connected via the mini USB-connector.
The watermeter has an opto-coupler output so you can connect it the way you like. For instance a Nodemcu-board. Also 5V is available on the 4-pin header. The power can also be supplied on this 4-pin header instead of the mini USB-connector.
If you want to build it yourself: send me an e-mail and i''ll send you on request the diagrams, Gerberfiles and hex-file for the PIC.