Rest API to count words in store