A way to figure out the cycle counts?

Is there a way to figure out the cycle count from the time the target reset to the code where you want to glitch. I need to get this data. I mean I can use the GPIO to glitch exactly where in the code I want but I need to know this number for people who don’t have access to target firmware.
I’m thinking to get this data, I can set a GPIO in my target code and have this GPIO connect one of CW’s IO pins. And have the target reset signal also connect to another CW’s IO pin. Then it just matter of record the CW’s time for the reset signal and GPIO signal and then translate it to cpu cyles. This number is then use for the ‘Ext Trigger Offset’ to glitch the code.
I’m looking though the capture python code but if you have any idea on how to do this please let me know.

Thanks.