Easy and concise solution! - Python
Approach\n Describe your approach to solving the problem. \nThis is a simple permutation problem. If you know, how to calculate the permutation of a word, rest 
# Approach\n<!-- Describe your approach to solving the problem. -->\nThis is a simple permutation problem. If you know, how to calculate the permutation of a word, rest is just multipying one\'s permutation with the previous one\'s. As simple as that.**Please upvote, if it helps you**.\n\n# Complexity\n- Time complexity: O(n^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n      res = 1\n      for wrd in s.split():\n        c, x = Counter(wrd), 1\n        for k,v in c.items(): x *= math.factorial(v)\n        res *= math.factorial(len(wrd))//x\n      \n      return res%(10**9+7)\n          \n```
['Python3']