Easy Programming Question

Hello, I know very little programming and I have a doubt.

If I have for example a simple timeline with 2 labels.
The first one is called “Intro” and the second one is called “Loop”.

So I would like to make the playhead start on frame 1 (“Intro” starts) and when it
gets to frame 100 (“Loop” ends), make it loop 3 times and then go back to frame 1.

So I would simply write the code:


for (loops=0;loops<=4;loops++){
      gotoAndPlay("Loop");
      }
gotoAndPlay("Intro");

Should that work?
Lets say it does, how would it increment loops to more than 1,
if when its incremented to 1 the playhead goes to frame 1,
runs that code again, so loops would be assigned 0 again, right?

Thanks, Marcelo.

PS: Let me know if i didnt make myself clear.