How do I make a movie loop once

so im trying to get a loop to play the first frame
until i is greater than 2.

so on the first frame Im increasing the value by 1

i++;

then on the last frame Im putting a if then statement
that if i is less than 2 replay, else goto and stop at
the next frame

var i = 1

if (i < 2 ){
gotoAndPlay(1);
}else{
gotoAndStop(361);
}

now I kinda know whats happening when the second code excecutes its resetting
var to 1, so my question is, how do I say once this movie has played once, stop the second time?

Do you want it to play twice or once?
else just make removeMovieClip(this) on the last frame of the MC.