counting words in multilingual texts