[F8] count variable scope (?)

Hi

I have a count variable so when I press a button “count” increments (it works)

But what I don’t get is how it works here…

var titlename:String = photos[count].getTitle();

but not here…

if (_root.userass[count] == _root.answers[count]) {
   container.resultsDisplay["indicator"+count].gotoAndStop("correct");
   
  } else {
   container.resultsDisplay["indicator"+count].gotoAndStop("fail");
  }

any ideas?

thanks