ehikioya.com
Online Word Counter [With Full Source Code] - Ehi Kioya
This page contains all you need to perform (and understand) word counting: A functional word counter, and a dump of its entire source code.