Python || Sliding Window || Simple Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(N) * 26\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(N)\n\n# Code\n```python3 []\nclass Solution:\n    def validSubstringCount(self, word1: str, word2: str) -> int:\n        l1, l2 = len(word1), len(word2)\n        if l1 < l2:return 0\n        c = Counter(word2)\n\n        def helper(dic):\n            for i , j in c.items():\n                if dic[i] < j:\n                    return False\n            return True \n\n\n        l = 0\n        i = 0\n        hold = defaultdict(int)\n        while i < l1:\n            hold[word1[i]] += 1\n            if helper(hold):break\n            i += 1\n        if i == l1:return 0\n        r = i\n        ans = 0\n        while r < l1:\n            while l < r:\n                hold[word1[l]] -= 1\n                if helper(hold):\n                    l += 1\n                else:\n                    hold[word1[l]] += 1\n                    break\n            ans += (l + 1)\n            r += 1\n            if r < l1:hold[word1[r]] += 1\n        return ans\n\n               \n```
['Hash Table', 'String', 'Sliding Window', 'Python3']