Dynamic text (counter) action

how to make if my counter counts to 3, to go on selected frame?!

if (badScoreText.text == String("3")) {
    gotoAndPlay(1);
    }

i’ve tryed this but no results -.-’

One more thing, how to calculate score from number of mistakes(badScoreNumb.text),time left(timeLeftLvl1.text) ??

any help?!
Thanks!
Aleksandar