more token counting logic debugging