count-pieces (npm): Gives you an inventory of tokens needed to write a given program
Keywords: tokenize