Counting Words With A Given Prefix Leetcode