Fixed a bug in tokenCount().