if i understand what you want to do... the easiest solution will be to increment a variable on each TIMER0 interrupt. you'll do it in your interrupt routine.