/*!
\return will return the number of objects published by this class.
769187
function objectCount()
    {
        $db = eZDB::instance();

        $countRow = $db->arrayQuery( 'SELECT count(*) AS count FROM ezcontentobject '.
                                     'WHERE contentclass_id='.$this->ID ." and status = " . eZContentObject::STATUS_PUBLISHED );

        return $countRow[0]['count'];
    }
1172585
public function Count( $Func = null )
	{

		return $Func ? $this->Where( $Func )->Count() : count( $this->repository );

	}
982825
public function count(): int
    {
        $size = 0;
        if (!$store = $this->getMessagesStore()) {
            return $size;
        }
        foreach ($store as $messages) {
            $size += \count($messages);
        }
        return $size;
    }
437756
public function getCount()
    {
        if ($this->_count !== null) {
            return $this->_count;
        }

        while ($this->_hasMore) {
            $this->fetchOutstanding();
        }

        return $this->_length;
    }
1301699
public function getResult()
    {
        if ($this->autoFormat && ! empty($this->object)) {
            return $this->object;
        }

        return $this->content;
    }
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);
    }
1168175
public function num_rows()
	{
		if (is_int($this->num_rows))
		{
			return $this->num_rows;
		}
		elseif (count($this->result_array) > 0)
		{
			return $this->num_rows = count($this->result_array);
		}
		elseif (count($this->result_object) > 0)
		{
			return $this->num_rows = count($this->result_object);
		}
		elseif (($num_rows = $this->result_id->rowCount()) > 0)
		{
			return $this->num_rows = $num_rows;
		}

		return $this->num_rows = count($this->result_array());
	}
798952
public function getPublishedDocumentCount()
	{
		$count = 0;
		foreach ($this->arrDocuments as $document)
		{
			if ($document->isPublished())
			{
				$count++;
			}
		}
		return $count;
	}
1225942
public function count()
    {
        if ($this->count === null) {
            $this->count = $this->resultSet->count();
        }
        return $this->count;
    }
1371264
function Count($where = null) {
		$this->LoadSchema();
		if ($this->UseCache('count')) {
			$cacheid = md5(json_encode($where));

			if ($value = $this->GetCache('count', $cacheid))
				return $value;
		}

		$this->ResetQuery(array(
			'method' => 'count',
			'table' => $this->table,
			'where' => $where,
		));

		$this->Trigger('access', $where);
		if (!$this->continue)
			return 0;

		$this->Trigger('pull', $where);
		if (!$this->continue)
			return 0;

		$this->Trigger('getall', $where);
		if (!$this->continue)
			return 0;

		$this->db->select('COUNT(*) AS count');
		$this->db->from($this->table);
		if ($where = $this->FilterFields($where, 'where'))
			$this->db->where($where);
		$row = $this->db->get()->row_array();
		if (!$this->continue)
			return 0;

		return isset($cacheid) ? $this->SetCache('count', $cacheid, $row['count']) : $row['count'];
	}
927789
public function getValue($returnObject = false){

        $returnValue = null;

        if(!is_null($this->value)){
            $returnValue = ($returnObject) ? $this->value : $this->value->getValue(); //return mixed
        }

        return $returnValue;
    }
911472
public static function get_authors_returns() {
        return new external_single_structure(array(
            'count' => new external_value(PARAM_INT, 'The total number of records.'),
            'authors' => new external_multiple_structure(
                new external_single_structure(array(
                    'id' => new external_value(PARAM_INT, 'The user ID'),
                    'fullname' => new external_value(PARAM_NOTAGS, 'The fullname'),
                    'pictureurl' => new external_value(PARAM_URL, 'The picture URL'),
                ))
            ),
            'warnings' => new external_warnings()
        ));
    }
1264517
public function getReturnType()
    {
        $isBuiltin  = false;
        $returnType = $this->functionLikeNode->getReturnType();
        $isNullable = $returnType instanceof NullableType;

        if ($isNullable) {
            $returnType = $returnType->type;
        }
        if ($returnType instanceof Identifier) {
            $isBuiltin = true;
            $returnType = $returnType->toString();
        } elseif (is_object($returnType)) {
            $returnType = $returnType->toString();
        } elseif (is_string($returnType)) {
            $isBuiltin = true;
        } else {
            return null;
        }

        return new ReflectionType($returnType, $isNullable, $isBuiltin);
    }
680914
static function size($filename, $returnFormatted = false) {
        if ($returnFormatted && self::isReadable($filename)) {
            return Number::readableSize((double)filesize($filename));
        }

        return file_exists($filename) ? filesize($filename) : 0;
    }
153677
public function count(): int
    {
        $collection = $this->documentManager->getCollection($this->documentClass);

        return $collection->count($this->query);
    }
481214
public function count($mode = COUNT_NORMAL)
    {
        if($mode == COUNT_RECURSIVE)
        {
            $count = 0;
            $data  = $this->__options;
            foreach ($data as $key => $value)
            {
                if(is_array($value) || $value instanceof KObjectConfig)
                {
                    if ($value instanceof KObjectConfigInterface) {
                        $count += $value->count($mode);
                    } else {
                        $count += count($value);
                    }
                }
            }
        }
        else $count = count($this->__options);

        return $count;
    }
1259215
public function count()
	{
		switch ($this->Mode)
		{
			case self::MODE_ERROR:
				return 0;
				break;
			case self::MODE_SINGLE:
				return 1;
				break;
			case self::MODE_MULTIPLE:
				return count($this->Data);
				break;
		}
		return 0;
	}