first iteration of word-count exercise