Wordcount function added