code: public function getNbResults()
      {
          $select = $this->prepareCountQueryBuilder();
          $sql = $select->getStatement();
          $sth = $this->pdo->prepare($sql);
          $sth->execute($this->select->getBindValues());
          $result = $sth->fetchColumn();
  
          return (int) $result;
      }
docs: {@inheritdoc}