Count pulse on GPIO 23