Added word count function