The str_word_count() function returns an array that holds all words in a string. It works great, except when using special characters. In this case, the php script receives the
for German language use this :
str_word_count($file, 1, 'ÄäÖöÜüß');
for all other languages - just to replace the special characters with yours (French, Polish etc...)