Fix word count calculation in the index.