Returns the number of related DealerShedulesVersion objects.

@param      Criteria $criteria
@param      boolean $distinct
@param      ConnectionInterface $con
@return int             Count of related DealerShedulesVersion objects.
@throws PropelException
503077
public function countDealerShedulesVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerShedulesVersionsPartial && !$this->isNew();
        if (null === $this->collDealerShedulesVersions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerShedulesVersions) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getDealerShedulesVersions());
            }

            $query = ChildDealerShedulesVersionQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByDealerShedules($this)
                ->count($con);
        }

        return count($this->collDealerShedulesVersions);
    }
682953
public function countC2Ms(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collC2MsPartial && !$this->isNew();
        if (null === $this->collC2Ms || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collC2Ms) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getC2Ms());
            }

            $query = ChildC2MQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByCategory($this)
                ->count($con);
        }

        return count($this->collC2Ms);
    }
451986
public function countUserCustomerRelations(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collUserCustomerRelationsPartial && !$this->isNew();
        if (null === $this->collUserCustomerRelations || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collUserCustomerRelations) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getUserCustomerRelations());
            }
            $query = UserCustomerRelationQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByUser($this)
                ->count($con);
        }

        return count($this->collUserCustomerRelations);
    }
55373
public function countParents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collParentsPartial && !$this->isNew();
        if (null === $this->collParents || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collParents) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getParents());
            }

            $query = ChildSkillDependencyQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterBySkillRelatedByParentId($this)
                ->count($con);
        }

        return count($this->collParents);
    }
667243
public function countPermissionsRelatedById(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collPermissionsRelatedByIdPartial && !$this->isNew();
        if (null === $this->collPermissionsRelatedById || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collPermissionsRelatedById) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getPermissionsRelatedById());
            }

            $query = ChildPermissionQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByPermissionRelatedByParentId($this)
                ->count($con);
        }

        return count($this->collPermissionsRelatedById);
    }
24927
public function countRemoteApps(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collRemoteAppsPartial && !$this->isNew();
        if (null === $this->collRemoteApps || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collRemoteApps) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getRemoteApps());
            }
            $query = RemoteAppQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByCustomer($this)
                ->count($con);
        }

        return count($this->collRemoteApps);
    }
523687
public function countCustomers(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collCustomersPartial && !$this->isNew();
        if (null === $this->collCustomers || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collCustomers) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getCustomers());
            }
            $query = CustomerQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByCountry($this)
                ->count($con);
        }

        return count($this->collCustomers);
    }
1151855
public function countDealerAdmins(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerAdminsPartial && !$this->isNew();
        if (null === $this->collDealerAdmins || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerAdmins) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getDealerAdmins());
            }

            $query = ChildDealerAdminQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByDealer($this)
                ->count($con);
        }

        return count($this->collDealerAdmins);
    }
638649
public function countMultiples(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collMultiplesPartial && !$this->isNew();
        if (null === $this->collMultiples || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collMultiples) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getMultiples());
            }

            $query = ChildSkillQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByMultipleOf($this)
                ->count($con);
        }

        return count($this->collMultiples);
    }
982704
public function countSkillsRelatedByEndPositionId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collSkillsRelatedByEndPositionIdPartial && !$this->isNew();
        if (null === $this->collSkillsRelatedByEndPositionId || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collSkillsRelatedByEndPositionId) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getSkillsRelatedByEndPositionId());
            }

            $query = ChildSkillQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByEndPosition($this)
                ->count($con);
        }

        return count($this->collSkillsRelatedByEndPositionId);
    }
36964
public function getChildren(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if (null === $this->collNestedSetChildren || null !== $criteria) {
            if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
                // return empty collection
                $this->initNestedSetChildren();
            } else {
                $collNestedSetChildren = ChildCategoryQuery::create(null, $criteria)
                    ->childrenOf($this)
                    ->orderByBranch()
                    ->find($con);
                if (null !== $criteria) {
                    return $collNestedSetChildren;
                }
                $this->collNestedSetChildren = $collNestedSetChildren;
            }
        }

        return $this->collNestedSetChildren;
    }
599815
public function countRootSkills(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collRootSkillsPartial && !$this->isNew();
        if (null === $this->collRootSkills || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collRootSkills) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getRootSkills());
            }

            $query = ChildSkillQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByKstrukturRoot($this)
                ->count($con);
        }

        return count($this->collRootSkills);
    }
900099
public function getDescendants(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if ($this->isLeaf()) {
            return array();
        } else {
            return ChildCategoryQuery::create(null, $criteria)
                ->descendantsOf($this)
                ->orderByBranch()
                ->find($con);
        }
    }
993153
public function getLastVersions($number = 10, $criteria = null, $con = null)
    {
        $criteria = ChildDealerVersionQuery::create(null, $criteria);
        $criteria->addDescendingOrderByColumn(DealerVersionTableMap::VERSION);
        $criteria->limit($number);

        return $this->getDealerVersions($criteria, $con);
    }
1325122
public function getDealerShedules(ConnectionInterface $con = null)
    {
        if ($this->aDealerShedules === null && ($this->id !== null)) {
            $this->aDealerShedules = ChildDealerShedulesQuery::create()->findPk($this->id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aDealerShedules->addDealerShedulesVersions($this);
             */
        }

        return $this->aDealerShedules;
    }
34634
public function countSkillGroups(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collSkillGroupsPartial && !$this->isNew();
        if (null === $this->collSkillGroups || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collSkillGroups) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getSkillGroups());
            }

            $query = ChildSkillGroupQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByGroup($this)
                ->count($con);
        }

        return count($this->collSkillGroups);
    }
935212
public function countVariations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collVariationsPartial && !$this->isNew();
        if (null === $this->collVariations || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collVariations) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getVariations());
            }

            $query = ChildSkillQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByVariationOf($this)
                ->count($con);
        }

        return count($this->collVariations);
    }