Using Permutation
\n# Code\n\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        words, total = s.split(), 1\n        for word in words:\n            anagrams 
\n# Code\n```\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        words, total = s.split(), 1\n        for word in words:\n            anagrams = math.factorial(len(word))\n            letters = Counter(word)\n            for occ in letters.values():\n                anagrams //= math.factorial(occ)\n            total *= anagrams\n        return total % 1000000007\n```
['Hash Table', 'Math', 'Python3']