Fix word count in controllers

The number of words in text boxes with a word count were being incorrectly calculated for cases when the submitted value contained multiple spaces in a row.