Initial implementation of word counter