Handling issues with event tracking

Hi all.

Is there a way to have the Ask user to complete program when stage is complete appear at the last event of a repeatable stage?

There is a tracker capture with a repeatable stage that must be filled nine times. I would like to have a prompt asking user to complete program when stage is complete at 9th visit. In other words, I am looking for ways of tracking the number of visits/events and close the enrollment when the number of visits is 9. i.e. thus, blocking entry form.

I’d appreciate if anyone can point me in the right direction or can suggest a way to approach the problem