Returns the number of results.

@return integer The number of results.
348488
public function getNbResults($params = array())
    {

        if ( isset( $this->nbResults ) )
        {
            return $this->nbResults;
        }
        $this->nbResults = $this->handler->searchCount( $this->form, $this->criteriaBuilder, $params );
        return $this->nbResults;
    }
111390
public function getResult() {
		if (!$this->result && $this->response && $this->response->getHttpStatus() >= 200 && $this->response->getHttpStatus() < 300) {
			// decode the response
			$this->result = json_decode($this->response->getRawResponse());
		}

		return $this->result;
	}
107064
public function getResults()
    {
        $page = $this->getRequestParameter('page');
        $limit = $this->getRequestParameter('rows');
        $order = $this->getRequestParameter('sortby');
        $sort = $this->getRequestParameter('sortorder');
        $query = $this->getRequestParameter('filterquery');
        $start = $limit * $page - $limit;

        $gau = array(
            'order' => $order,
            'orderdir' => strtoupper($sort),
            'offset' => $start,
            'limit' => $limit,
            'recursive' => true
        );

        try {
            $data = array();
            $readOnly = array();
            $user = $this->getSession()->getUser();
            $rights = array(
                'view' => !AclProxy::hasAccess($user, 'oat\taoOutcomeUi\controller\Results', 'viewResult', array()),
                'delete' => !AclProxy::hasAccess($user, 'oat\taoOutcomeUi\controller\Results', 'delete', array()));
            if ($query) {
                $resultsData = new ResultsMonitoringDatatable(DatatableRequest::fromGlobals());
                $resultsData->setServiceLocator($this->getServiceLocator());
                $payload = $resultsData->getPayload();
                $results = $payload['data'];
                $count = $payload['records'];
            } else {
                $delivery = new \core_kernel_classes_Resource(tao_helpers_Uri::decode($this->getRequestParameter('classUri')));
                $this->getResultStorage($delivery);
                $results = $this->getResultsService()->getImplementation()->getResultByDelivery(array($delivery->getUri()), $gau);
                $count = $this->getResultsService()->getImplementation()->countResultByDelivery(array($delivery->getUri()));
            }

            foreach ($results as $res) {

                $deliveryExecution = $this->getServiceProxy()->getDeliveryExecution($res['deliveryResultIdentifier']);

                try {
                    $startTime = \tao_helpers_Date::displayeDate($deliveryExecution->getStartTime());
                } catch (\common_exception_NotFound $e) {
                    $this->logWarning($e->getMessage());
                    $startTime = '';
                }

                $user = UserHelper::getUser($res['testTakerIdentifier']);
                $userName = UserHelper::getUserName($user, true);
                if (empty($userName)) {
                    $userName = $res['testTakerIdentifier'];
                }

                $data[] = array(
                    'id' => $deliveryExecution->getIdentifier(),
                    'ttaker' => _dh($userName),
                    'time' => $startTime,
                );

                $readOnly[$deliveryExecution->getIdentifier()] = $rights;
            }

            $this->returnJson(array(
                'data' => $data,
                'page' => floor($start / $limit) + 1,
                'total' => ceil($count / $limit),
                'records' => count($data),
                'readonly' => $readOnly
            ));
        } catch (\common_exception_Error $e) {
            $this->returnJson(array(
                'error' => $e->getMessage()
            ));
        }
    }
193431
public function getNbResults()
    {
        if (isset($this->nbResults)) {
            return $this->nbResults;
        }

        $countQuery = clone $this->query;
        $countQuery->limit = 0;

        return $this->nbResults = $this->findService->findNodes($countQuery)->totalCount;
    }
1352293
public function count()
    {
        if (null === $this->count) {
            try {
                $this->count = array_sum(array_map('current', $this->getCountQuery()->getScalarResult()));
            } catch (NoResultException $e) {
                $this->count = 0;
            }
        }

        return $this->count;
    }
1039571
public function count() {
		$criteria = clone $this->getCriteria();
		
		$result = $criteria->limit(0, 0)
		         ->columns(['count' => 'COUNT(*)'])
		         ->findFirst();
		
		return (int) $result->count;
	}
669212
public function count()
    {
        if ($this->isInitialized()) {
            return $this->collection->count();
        }

        // Return cached result in case count query was already executed
        if ($this->count !== null) {
            return $this->count;
        }

        return $this->count = $this->entityPersister->count($this->criteria);
    }
1116922
public function result()
    {
        $string = "";
        while ($this->count > 0) {
            $string .= $this->util->cursor->startOfCurrentLine();
            $string .= $this->util->cursor->deleteCurrentLine();
            --$this->count;

            $string .= $this->util->cursor->up();
        }

        $string .= $this->util->cursor->down();

        return $string;
    }
171721
public function getResults()
    {
        $skip = ($this->page-1)*$this->limit;
        
        $cursor = $this->getCursor();
        $cursor->skip($skip);

        $results = array();
        $i = 0;

        while($cursor->valid() && $cursor->current() && $i++ < $this->limit) {

            $object = new $this->modelName();
            $object->writeAttributes($cursor->current());

            $pseudoCursor = new \stdClass();
            foreach ($object as $key => $value) {
                $pseudoCursor->$key = $value;
            }

            $results[] = $pseudoCursor;
            $cursor->skip();
        }

        return $results;
    }
1088423
public function getTotal()
    {
        $query = $this->getQuery()->select('COUNT(*) as total');

        $rows = $this->database->query($query, $this->database->getBinds());

        if (!isset($rows[0]['total'])) {
            return 0;
        }

        return $rows[0]['total'];
    }
1338747
public function getTotalResults()
    {
        $query = $this->deliverQueryObject();
        $query
            ->resetQueryParts(['groupBy', 'orderBy'])
            ->select('count(distinct p.id)')
            ->setMaxResults(1);
        $result = $query->execute()->fetchColumn();

        return (int) $result;
    }
1196885
protected function results()
    {
        $results = [];
        
        if (is_array($this->data)) {
            if ($this->singleMode) {
                if ($this->singleModeBottom) {
                    if (isset($this->data[0])) {
                        return [$this->singleResult($this->data[0], $this->singleMode)];
                    }
                }
            } else {
                foreach ($this->data as $data) {
                    $results[] = $this->singleResult($data, $this->singleMode);
                }
            }
        }
        
        return $results;
    }
1061556
public function getNbResults()
    {
        if (!$this->resultSet) {
            return $this->searchable->search($this->query)->getTotalHits();
        }

        return $this->resultSet->getTotalHits();
    }
799793
function getNbResults()
    {
        $this->sphinx->SetLimits(1, 1, $this->options['max_results']);
        $results = $this->sphinx->searchEx($this->query, $this->options['entity']);

        return $results['total_found'];
    }
40149
public function count()
    {
        if ( !$this->count ) return $this->iterator->count();

        if ($this->count instanceOf \Closure) {
            $this->count = $this->count->__invoke();
        }

        return $this->count;
    }
1023239
public function count()
    {
        // this catches the situation where OL returned errno 32 = no such object!
        if (!$this->_search) {
            return 0;
        }
        // ldap_count_entries is slow (see pear bug #18752) with large results,
        // so we cache the result internally.
        if ($this->_count_cache === null) {
            $this->_count_cache = @ldap_count_entries($this->_link, $this->_search);
        }

        return $this->_count_cache;
    }
610229
public function count()
    {
        if ($this->action() !== self::ACTION_READ) {
            return 0;
        }

        if (!$this->__resultSet) {
            $this->_execute();
        }

        if ($this->__resultSet) {
            return $this->__resultSet->total();
        }

        return 0;
    }