docs: async def count(query, clear_limit=False):
      """Perform *COUNT* aggregated query asynchronously.
  
      :return: number of objects in ``select()`` query
      """
      clone = query.clone()
      if query._distinct or query._group_by or query._limit or query._offset:
          if clear_limit:
              clone._limit = clone._offset = None
          sql, params = clone.sql()
          wrapped = 'SELECT COUNT(1) FROM (%s) AS wrapped_select' % sql
          raw = query.model.raw(wrapped, *params)
          return (await scalar(raw)) or 0
      else:
          clone._returning = [peewee.fn.Count(peewee.SQL('*'))]
          clone._order_by = None
          return (await scalar(clone)) or 0