Count number of tokens in state