Python Easy solution
\nclass Solution:\n    def digitCount(self, num: str) -> bool:\n        counter=Counter(num)\n        for i in range(len(num)):\n            if counter[f\'{i}\'
```\nclass Solution:\n    def digitCount(self, num: str) -> bool:\n        counter=Counter(num)\n        for i in range(len(num)):\n            if counter[f\'{i}\'] != int(num[i]):\n                return False\n        return True\n```\n\n**Time - O(n)\nSpace - O(n)**\n\n---\n\n***Please upvote if you find it useful***
['Python', 'Python3']