precedenceCount as global variable