

def count(self, clear_limit=False):
    if (self._distinct or self._group_by or self._limit or self._offset):
        return self.wrapped_count(clear_limit=clear_limit)
    return (self.aggregate(convert=False) or 0)

dataset/ETHPy150Open coleifer/peewee/peewee.py SelectQuery.count/original