Word count function added