input: def divisive_portion_count(s: str) -> int:
      """
      Given a string s, partition it into balanced portions, where each character in the string occurs the same number of times. For example, if s == "xxyyzz" then partitions like ("xx", "yy", "zz") and ("xxyz", "yz") are valid, whereas ("xx", "yz", "yz") is not. The invalid partitions are indicated in bold.
  
      Return the minimum count of portions into which s can be divided.
  
      Note: A balanced substring is one where the occurrences of each character are equal.
  
      Examples:
      >>> s = "aaabbbccc"
      3
      >>> s = "xyxyxyxxyyz"
      2
  
      Constraints:
      1 <= s.length <= 1000
      s consists only of English lowercase letters.
      """
output:     
      from collections import Counter
  
      n = len(s)
      if n == 0:
          return 0
      
      count = Counter(s)
      min_count = min(count.values())
  
      portions = 0
      for char in count.keys():
          portions = max(portions, count[char] // min_count)
      
      return portions
  