Intel Corporation Interview Question

Counting words in a string.