Hi,
No, such an example is not available but you can use writing to EEPROM, considering number of E/W cycles. Each time the MCU is woken up then the number is increased.
You have not mentioned whether you mean only POR reset or any Wake up from low power mode.
If you count only wake up during run mode then you can use RAM variable for counting, however, the number must be stored finally into EEPROM or FLASH when device is switched off. So, you have to be able to check switching off the device and ensure enough time to be able to store last number from RAM to EEPROM before the voltage drops down.
The EEPROM example for S12ZVL128 is attached.
One thing I would like to mention is that it is good to inform us about MCU you use as a part of the question.
Best regards,
Ladislav