Given a list of words (without duplicates), return the number of concatenated words — words that are formed entirely by concatenating at least two shorter words from the same list. Input: a JSON array of strings.
Input: JSON array of strings.
Output: Integer — count of concatenated words.
Input: ["cat","cats","catsdogcats","dog","dogcatsdog","hippopotamuses","rat","ratcatdogcat"]
Output: 3
Explanation: catsdogcats, dogcatsdog, ratcatdogcat.Input: ["cat","dog","catdog"]
Output: 1
Explanation: 'catdog'.Input: ["a","b","c"]
Output: 0
Explanation: None are concatenations.1<=words.length<=10^40<=words[i].length<=30