count the total number of anagram sets in an array of strings.