If he is counting edges for some type of signal, a series R - shunt C filter may be better than the debounce filter. Just pick the 1/RC time constant to be higher than the max frequency of the signal you are trying to count, the nyquist freq (f*2) being a good starting point.
Bookmarks