  
  class Count(Aggregate):
      function = 'COUNT'
      name = 'Count'
      template = '%(function)s(%(distinct)s%(expressions)s)'
      output_field = IntegerField()
  
      def __init__(self, expression, distinct=False, filter=None, **extra):
          if expression == '*':
              expression = Star()
 
</s> remove     def __init__(self, expression, distinct=False, filter=None, **extra):
 </s> add     def __init__(self, expression, filter=None, **extra): </s> remove     def __init__(self, *args, filter=None, **kwargs):
 </s> add     def __init__(self, *expressions, distinct=False, filter=None, **extra):
        if distinct and not self.allow_distinct:
            raise TypeError("%s does not allow distinct." % self.__class__.__name__)
        self.distinct = distinct </s> remove     def __init__(self, expression, delimiter, distinct=False, **extra):
        distinct = 'DISTINCT ' if distinct else ''
        super().__init__(expression, delimiter=delimiter, distinct=distinct, **extra)
 </s> add     def __init__(self, expression, delimiter, **extra):
        super().__init__(expression, delimiter=delimiter, **extra)
  
  class Count(Aggregate):
      function = 'COUNT'
      name = 'Count'

      output_field = IntegerField()
  
      def __init__(self, expression, distinct=False, filter=None, **extra):
          if expression == '*':
              expression = Star()
keep keep keep keep replace keep keep keep keep keep
 Fixed #28658 -- Added DISTINCT handling to the Aggregate class. 
django/db/models/aggregates.py