to use interrupt as a counter while low power