Given a list of words and a list of prefixes, return for each prefix how many words start with it.
Return the counts in the same order as prefixes.
A word counts as starting with itself: "app" starts with "app".
This is the smallest problem that shows why a trie exists. Scanning every word for every prefix is O(prefixes x words x length); a trie answers each prefix in time proportional to the prefix alone.