Implement `trieInsertAndCount(words)` that inserts all words into a trie and returns the number of distinct words (duplicates count once).
+ 1 hidden test run on Submit.
Each distinct word sets exactly one end flag, so counting end flags counts distinct words.
Run your code to see results.