tree walker variable counter