private function setFilteredRows(Table $table, Request $request)
    {
        $qb = $table->getQueryBuilder();
        $qbfr = clone $qb;
        $this->addSearch($table, $request, $qbfr);

        $identifiers = $table->getIdentifierFieldNames();

        if (is_null($identifiers)) {
            $paginatorFiltered = new Paginator($qbfr->getQuery());
            $count = $paginatorFiltered->count();
        } else {
            $qbfr->select($qbfr->expr()->count($identifiers));
            $count = (int) $qbfr->getQuery()->getSingleScalarResult();
        }

        $table->setFilteredRows($count);
    }