docs: def count(self):
          """return the count of the criteria"""
  
          # count queries shouldn't care about sorting
          fields_sort = self.fields_sort
          self.fields_sort = self.fields_sort_class()
  
          self.default_val = 0
          ret = self._query('count')
  
          # restore previous values now that count is done
          self.fields_sort = fields_sort
  
          return ret