Fast Switch on/off counts
In case anybody is looking for fast switch on/off counts, you can remove the resistor before the input pin , so the sensitivity is higher. One resistor strategy.
Also, use this style code. Together, the accuracy and speed are awesome.
Before I found this, I used the normal switch connection ( with two resistors ) to try my pedometer for half a day, the performance was very pool. Solder and re-solder, did not solve the problem. Arduino almost could not get accurate reading.