Loop events for a certain ammount of time

Is there a way to loop events for certain amount of times
For example
I’m going to say hello 5 time and then stop

Like this maybe:

There’s probably half a dozen ways of doing it, though.