The count words in chapter seven about page 208 is too simple because every time you key a space the word count goes up. The authors mention that this code is kind of bogus but do not say how it can be improved. Anywho, this snippet works much better than the one in the book. Paste it in the function CountWords to check it out. Just comment the original lines.
Code:
Dim my_word_array() As String = System.Text.RegularExpressions. _
Regex.Split(text, "\W+")
return my_word_array.Length
