It will be much easier, if you use these switch clicks to charge an capacitor, and measure it's voltage with ADC after. You have only 10 steps, so it will work just fine, no debouncing, no schmitt...