framerate independent counter for animation