Fix ignoring the first time a word is added in the index.
Add a method to retrieve the number of occurences of a word in the index.
Add tests for word count.
Merge pull request #10 from Neki/topic/bf_fix_index_word_count

Fix word count calculation in the index.