Make word count compatible with all apps

+ minor fixes