public function getEntityCount(IEntity $parent = null) { if ($this->relationshipMapper) { return $this->relationshipMapper->getIteratorCount($parent, $this); } return $this->getIteratorCount(); }