I have an internal library for counting tokens on files and directories, should probably opensource it.