Fix count of tokens check