wc is a Unix command line tool.

Build your own wc is available with a project breakdown on Coding Challenges.