Anagram counting