Word Count using Trie