Example code from [K&R][chapter 1.5.4], simple word counter.