Fixed off-by-one bug in word count validation