Clock Monitoring

Thanks for your reply. Your solution sounds good, but what if the DUT does not explicit put out its counter output (i.e. I should make a stimulus sequence to take that value)?
In my previous approach, I wanted to wait for a random number of cycles, read the value, and further run for the next random number of cycles.
It would be good if I put another counter in the HDL next to the DUT for counting down these clock cycles?