The water counter on ESP8266 for Arduino IDE
You may use an MQTT server to integrate into a home automation software.
A mini wifi board with 4MB flash based on ESP-8266EX - Wemos D1 mini https://www.wemos.cc/en/latest/d1/d1_mini.html
Micro SD Card Shield for Wemos D1 mini - https://www.wemos.cc/en/latest/d1_mini_shield/micro_sd.html
Added software debounce
Optional:
Lithium (LiPo) Battery shield, charging & boost for Wemos D1 mini - https://www.wemos.cc/en/latest/d1_mini_shield/battery.html
A triple(x3) Base for Wemos D1 mini - https://www.wemos.cc/en/latest/d1_mini_shield/tripler_base.html
Resistor 12kOm 0.125W for Battery shield (for external power control, see https://github.com/anyuta1166/watermeter/blob/master/doc/images/Wemos1.jpg)
Lithium (LiPo) Battery 18650 2600mAh 3.7V - https://github.com/anyuta1166/watermeter/blob/master/doc/images/battery.jpg