Count no of times switch is on or off - Wokwi ESP32, STM32, Arduino Simulator