Returns the count of objects related to this tag

@return int
195653
public function getRelatedObjectsCount()
    {
        // Not an easy task to fetch published objects with API and take care of current_version, status
        // and attribute version, so just use SQL to fetch the object count in one go
        $tagID = (int) $this->attribute( 'id' );

        $db = eZDB::instance();
        $result = $db->arrayQuery( "SELECT COUNT(DISTINCT o.id) AS count FROM eztags_attribute_link l
                                   INNER JOIN ezcontentobject o ON l.object_id = o.id
                                   AND l.objectattribute_version = o.current_version
                                   AND o.status = " . eZContentObject::STATUS_PUBLISHED . "
                                   WHERE l.keyword_id = $tagID" );

        if ( is_array( $result ) && !empty( $result ) )
            return (int) $result[0]['count'];

        return 0;
    }
1099408
public static function count()
    {
        $memoryTableAnnotation = ModelManager::getAnnotation(static::class, MemoryTable::class);
        if(null === $memoryTableAnnotation)
        {
            return null;
        }
        return MemoryTableManager::count($memoryTableAnnotation->name);
    }
1121493
function objectCount()
    {
        $db = eZDB::instance();

        $languageID = $this->ID;
        if ( $db->databaseName() == 'oracle' )
        {
            $whereSQL = "bitand( language_mask, $languageID ) > 0";
        }
        else
        {
            $whereSQL = "language_mask & $languageID > 0";
        }

        $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentobject WHERE $whereSQL" );
        return $count[0]['count'];
    }
444101
public function count()
    {
        if (count($this->stack) || !($this->array instanceof \Countable)) {
            $this->squash();
        }
        return $this->array->count();
    }
45016
public static function fetchListCount()
    {
        $rows = eZPersistentObject::fetchObjectList( self::definition(),
                                                     array(),
                                                     null,
                                                     false,
                                                     null,
                                                     false, false,
                                                     array( array( 'operation' => 'count( * )',
                                                                   'name' => 'count' ) ) );
        return $rows[0]['count'];
    }
1363670
public function child_count() {

		$count = 0;
		if ( ! empty( $this->child ) ) {
			foreach ( $this->child as $child ) {
				if ( $this->is_section_object( $child ) ) {
					$count ++;
				}
			}
		}

		return $count;
	}
867530
public function count()
    {
        if ($this->iterator instanceof Countable) {
            return $this->iterator->count();
        }

        return iterator_count($this->iterator);
    }
792227
public function count()
    {
        $query   = $this->query();
        $myQuery = $query instanceof EloquentBuilder ? clone $this->query() : $query;
        if ($query instanceof Collection) {
            return $query->count();
        }

        $finalQuery = $this->applyScopes($myQuery);
        $this->applyGlobalGroupScope($finalQuery);


        // if its a normal query ( no union, having and distinct word )
        // replace the select with static text to improve performance
        $connection = $finalQuery->getQuery()->getConnection();

        if (!Str::contains(Str::lower($finalQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) {

            $row_count = $connection->getQueryGrammar()->wrap('row_count');
            return $connection->table($connection->raw('(' . $finalQuery->toSql() . ') count_row_table'))->select($connection->raw("'1' as {$row_count}"))->setBindings($finalQuery->getBindings())->count();
        }

        return $connection->table($connection->raw('(' . $finalQuery->toSql() . ') count_row_table'))
                        ->setBindings($finalQuery->getBindings())->count();
    }
1020643
public function getCount()
    {
        if ($this->count === NULL) {
            $this->count = $this->getModel()->getCount();
        }

        return $this->count;
    }
73333
public function getCommentCount()
    {
        return count(Comment::findAll([
            'parent_id' => $this->id,
            'model' => self::COMMENT_FOR,
            'status' => Comment::STATUS_APPROVED
        ]));
    }
1330597
public function getCount () {
        if ($this->_count === null) {
            $this->_count = $this->getConnection ()->getSlave ()->scard ($this->name);
        }
        return $this->_count;
    }
703012
public function count()
    {
        if (is_callable($count = $this->count)) {
            $this->count = $count();
        }

        return $this->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);
    }
1169624
private function _countObjectsInCollection()
    {
        $select = Statement::get(
            'GET_COLLECTION_OBJECT_COUNT',
            [
                '@collection' => $this->_name
            ]
        );
        $count = $this->_connector->query($select)->fetch();
        if ($count) {
            return (int) $count[0];
        } else {
            return 0;
        }
    }
1188994
public function countUngenerated()
    {
        $query = $this->createQuery();
        $query->matching($query->logicalAnd($query->equals('resource', null), $query->equals('staticResource', null)));
        return $query->count();
    }
1033807
public function getCount()
	{
		if ( $this->empty ) return 0;

		if ( $this->src->getIsFinished() )
		{
			return count( $this->buffer );
		}
		return parent::getCount();
	}
91635
public function countChildren()
    {
        if ($this->hasChildrenRelation()) {
            $result = $this->getRelation($this->getChildrenRelationIndex())->count();
        } else {
            $result = $this->queryByParentId()->count();
        }

        return $result;
    }