@param string $parentName

@return int
510712
public function subtreeLeafCount($parentName) {
    return ('' === $parentName)
      ? count($this->leafMap)
      : count($this->subtreeLeafMap[$parentName]);
  }
861649
public function getCountByParent( $parentId, $parentType ) {

		$modelClass	= static::$modelClass;

		return $modelClass::queryByParent( $parentId, $parentType )->count();
	}
196822
public function iHaveUserInGroup($username, $parentGroupName)
    {
        $email = $this->findNonExistingUserEmail($username);
        $password = $username;
        $user = $this->ensureUserExists($username, $email, $password, $parentGroupName);
    }
259309
public function getMetadataFor($tableName, array $parentName = array())
    {
        $avaibleData = array();
        foreach ($this->getAllMetadata() as $metadata) {
            $avaibleData[] = $metadata->getName();
            if ($metadata->getName() === $tableName) {
                return $metadata;
            }
        }

        throw new \Exception(sprintf('"%s" not found in "%s"', $tableName, implode(', ', $avaibleData)));
    }
35062
public function checkUserExistenceByUsername($username, $parentGroupName = null)
    {
        if ($parentGroupName) {
            // find parent group name
            $searchResults = $this->searchUserGroups($parentGroupName);
            if (empty($searchResults)) {
                // group not found, so return immediately
                return false;
            }
            $groupId = $searchResults[0]->valueObject->contentInfo->id;
        } else {
            $groupId = null;
        }
        $searchResults = $this->searchUserByLogin($username, $groupId);

        return empty($searchResults) ? false : true;
    }
943046
public static function queryByParent( $parentId, $parentType ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype", [ ':pid' => $parentId, ':ptype' => $parentType ] );
	}
205893
public function count($parentId, array $query = [])
    {
        $resource = $this->createPartialResourceUrlForList($parentId).'/count';

        return $this->client->get($resource, $query)['count'];
    }
790262
public function countChildren($parentId, $siteId)
    {
        $qa = $this->createAggregationQuery();
        $qa->match(
            array(
                'siteId'     => $siteId,
                'parent.$id' => new \MongoId($parentId)
            )
        );

        return $this->countDocumentAggregateQuery($qa);
    }
962700
public function getParentTargetName(string $name)
    {
        if (empty($this->parentAliases[$name])) {
            return $name;
        }
        return $this->parentAliases[$name];
    }
980475
public function deleteUrlAliasesWithoutParent(): int
    {
        $existingAliasesQuery = $this->getAllUrlAliasesQuery();

        $query = $this->connection->createQueryBuilder();
        $query
            ->delete($this->table)
            ->where(
                $query->expr()->neq(
                    'parent',
                    $query->createPositionalParameter(0, \PDO::PARAM_INT)
                )
            )
            ->andWhere(
                $query->expr()->notIn(
                    'parent',
                    $existingAliasesQuery
                )
            )
        ;

        return $query->execute();
    }
57647
private function countSubitems(Location $parentLocation): int
    {
        $searchQuery = $this->getSearchQuery($parentLocation);

        $searchQuery->limit = 0;
        $searchQuery->offset = 0;
        $searchQuery->performCount = true;

        return $this->searchService->findLocations($searchQuery)->totalCount;
    }
1109283
public function output(string $filename = null): int
    {
        if (null !== $filename) {
            $this->sendHeaders($filename);
        }
        $input_bom = $this->getInputBOM();
        $this->document->rewind();
        $this->document->fseek(strlen($input_bom));
        echo $this->output_bom;

        return strlen($this->output_bom) + $this->document->fpassthru();
    }
1340053
private function getCountChildren($nodeUid, $classname)
    {
        $query = sprintf(
                'SELECT COUNT(%s) FROM %s WHERE %s = ?', 
                $this->requiredFields['uid'], 
                $this->em->getClassMetadata($classname)->getTableName(), 
                $this->requiredFields['parent_uid']
        );

        $result = $this->em->getConnection()
                ->executeQuery($query, array($nodeUid), array(Type::STRING))
                ->fetchAll(\PDO::FETCH_COLUMN);

        return array_pop($result);
    }
593661
public function count($hookName) : int
    {
        $hookName = $this->sanitizeKeyName($hookName);
        if (!$hookName || ! isset($this->filters[$hookName])) {
            return 0;
        }
        return count($this->filters[$hookName]);
    }
1072966
public function getDepth ($parent = 0)
    {
        $counter = 0;
        $r = true;

        while ($r) {
            $category = self::where('id' , $parent)->first();
            if ($category) {
                $counter++;
                $parent = $category->parent;
                if ($category->parent == 0) {
                    break;
                }
            } else
                break;
        }
        return $counter;
    }
990168
public function getParent($id)
    {
        if ($parent = $this->qb
            ->from($this->table)
            ->where($this->parentKey, $id)
            ->get(1)) {
            if ($parent->count() == 1) {
                return $parent;
            }
        }

        return false;
    }
635524
public function getAnnotationsCount($annotationName) {
		if (isset($this->annotationsArrayAsString[$annotationName]))
			return count($this->annotationsArrayAsString[$annotationName]);
		else
			return 0;
	}