parameters: (self, s, count)
return_statement: return result
docstring: :type s: str
          :type count: int
          :rtype: int
docstring_summary: :type s: str
          :type count: int
          :rtype: int
docstring_tokens: : type s : str : type count : int : rtype : int
function: def equalCountSubstrings(self, s, count):
          """
          :type s: str
          :type count: int
          :rtype: int
          """
          result = 0
          for l in xrange(1, min(len(set(s)), len(s)//count)+1):
              cnt, equal_cnt = collections.Counter(), 0
              for i, c in enumerate(s):
                  cnt[c] += 1
                  equal_cnt += (cnt[c] == count)
                  if i >= count*l:
                      equal_cnt -= (cnt[s[i-count*l]] == count)
                      cnt[s[i-count*l]] -= 1
                  result += (equal_cnt == l)
          return result
function_tokens: def equalCountSubstrings ( self , s , count ) : result = 0 for l in xrange ( 1 , min ( len ( set ( s ) ) , len ( s ) // count ) + 1 ) : cnt , equal_cnt = collections . Counter ( ) , 0 for i , c in enumerate ( s ) : cnt [ c ] += 1 equal_cnt += ( cnt [ c ] == count ) if i >= count * l : equal_cnt -= ( cnt [ s [ i - count * l ] ] == count ) cnt [ s [ i - count * l ] ] -= 1 result += ( equal_cnt == l ) return result