initial word count logic