From what i remind, Timer2 is unfortunately just a timer and have something to do with the HPWM and CCP2 module.. not a counter. But timer0, timer1 can be used as counter.

In your case you could also use any interrupt source and increment a variable in the ISR.