parameters: (self, words, chars)
return_statement: return sum(len(word) for word in words if check(word, chars, count))
docstring: :type words: List[str]
          :type chars: str
          :rtype: int
docstring_summary: :type words: List[str]
          :type chars: str
          :rtype: int
docstring_tokens: : type words : List [ str ] : type chars : str : rtype : int
function: def countCharacters(self, words, chars):
          """
          :type words: List[str]
          :type chars: str
          :rtype: int
          """
          def check(word, chars, count):
              if len(word) > len(chars):
                  return False
              curr_count = collections.Counter()
              for c in word:
                  curr_count[c] += 1
                  if c not in count or count[c] < curr_count[c]:
                      return False
              return True
          
          count = collections.Counter(chars)
          return sum(len(word) for word in words if check(word, chars, count))
function_tokens: def countCharacters ( self , words , chars ) : def check ( word , chars , count ) : if len ( word ) > len ( chars ) : return False curr_count = collections . Counter ( ) for c in word : curr_count [ c ] += 1 if c not in count or count [ c ] < curr_count [ c ] : return False return True count = collections . Counter ( chars ) return sum ( len ( word ) for word in words if check ( word , chars , count ) )