import collections
from typing import List


class Solution:

    def countCharacters(self, words: List[str], chars: str) ->int:
        good = collections.Counter(chars)
        result = 0
        for word in words:
            missing = collections.Counter(word) - good
            if not missing:
                result += len(word)
        return result

f3ae47622b46bc7ec95414d6e74dc411ae09a797
<mask token>

<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def countCharacters(self, words: List[str], chars: str) ->int:
        good = collections.Counter(chars)
        result = 0
        for word in words:
            missing = collections.Counter(word) - good
            if not missing:
                result += len(word)
        return result

import collections
from typing import List


class Solution:

    def countCharacters(self, words: List[str], chars: str) ->int:
        good = collections.Counter(chars)
        result = 0
        for word in words:
            missing = collections.Counter(word) - good
            if not missing:
                result += len(word)
        return result
