Variable undefined?

on the first frame of my movie I have

counter == 0;

a few frames later I have a trace(counter); and it says my variable is undefined? Why is this? Thanks!