This should get you most of the way there: Set number of loops
When the 3rd loop is detected, you would simply run this Hype JS function:
hypeDocument.pauseTimelineNamed('Main Timeline');
Or, you could trigger a timeline that does what you wish (pause a different timeline, or do something else). Here are more JS functions relating to Timelines.