Count total number of tokens in state