You can use watchdog reset to wakeup the MCU from sleep. Since you can establish the time delay for the watchdog reset ( setting the prescaler) you can increment a word variable at each wakeup and go...