Returns the number of related SkillPart objects.

@param      Criteria $criteria
@param      boolean $distinct
@param      ConnectionInterface $con
@return int             Count of related SkillPart objects.
@throws PropelException
486536
public function countComposites(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collCompositesPartial && !$this->isNew();
        if (null === $this->collComposites || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collComposites) {
                return 0;
            }

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

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

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

        return count($this->collComposites);
    }
806220
public function countStructureNodeParentsRelatedByStructureNodeId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collStructureNodeParentsRelatedByStructureNodeIdPartial && !$this->isNew();
        if (null === $this->collStructureNodeParentsRelatedByStructureNodeId || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collStructureNodeParentsRelatedByStructureNodeId) {
                return 0;
            }

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

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

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

        return count($this->collStructureNodeParentsRelatedByStructureNodeId);
    }
1187867
public function countDealerContacts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerContactsPartial && !$this->isNew();
        if (null === $this->collDealerContacts || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerContacts) {
                return 0;
            }

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

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

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

        return count($this->collDealerContacts);
    }
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);
    }
716522
public function countDescendants(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if ($this->isLeaf()) {
            // save one query
            return 0;
        } else {
            return ChildCategoryQuery::create(null, $criteria)
                ->descendantsOf($this)
                ->count($con);
        }
    }
925077
public function countFunctionPhasesRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collFunctionPhasesRelatedBySkillIdPartial && !$this->isNew();
        if (null === $this->collFunctionPhasesRelatedBySkillId || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collFunctionPhasesRelatedBySkillId) {
                return 0;
            }

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

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

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

        return count($this->collFunctionPhasesRelatedBySkillId);
    }
1244033
public function countAttributeTypeI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collAttributeTypeI18nsPartial && !$this->isNew();
        if (null === $this->collAttributeTypeI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collAttributeTypeI18ns) {
                return 0;
            }

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

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

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

        return count($this->collAttributeTypeI18ns);
    }
599672
public function getLastVersions($number = 10, $criteria = null, $con = null)
    {
        $criteria = ChildSkillVersionQuery::create(null, $criteria);
        $criteria->addDescendingOrderByColumn(SkillVersionTableMap::COL_VERSION);
        $criteria->limit($number);

        return $this->getSkillVersions($criteria, $con);
    }
644935
public function countPersonTeamLinks(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collPersonTeamLinksPartial && !$this->isNew();
        if (null === $this->collPersonTeamLinks || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collPersonTeamLinks) {
                return 0;
            }

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

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

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

        return count($this->collPersonTeamLinks);
    }
939127
public function countDealerProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerProductsPartial && !$this->isNew();
        if (null === $this->collDealerProducts || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerProducts) {
                return 0;
            }

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

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

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

        return count($this->collDealerProducts);
    }
1142125
public function countKstruktursRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collKstruktursRelatedBySkillIdPartial && !$this->isNew();
        if (null === $this->collKstruktursRelatedBySkillId || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collKstruktursRelatedBySkillId) {
                return 0;
            }

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

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

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

        return count($this->collKstruktursRelatedBySkillId);
    }
964230
public function countFeatureTypeI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collFeatureTypeI18nsPartial && !$this->isNew();
        if (null === $this->collFeatureTypeI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collFeatureTypeI18ns) {
                return 0;
            }

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

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

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

        return count($this->collFeatureTypeI18ns);
    }
1279708
public function countLineagesRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collLineagesRelatedBySkillIdPartial && !$this->isNew();
        if (null === $this->collLineagesRelatedBySkillId || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collLineagesRelatedBySkillId) {
                return 0;
            }

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

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

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

        return count($this->collLineagesRelatedBySkillId);
    }
955498
public function countDealerAdminVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerAdminVersionsPartial && !$this->isNew();
        if (null === $this->collDealerAdminVersions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerAdminVersions) {
                return 0;
            }

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

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

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

        return count($this->collDealerAdminVersions);
    }
366177
public static function distinct( $key , $criteria = array() )
    {

        self::processCriteriaWithType($criteria);
        $query = array('distinct'=>self::collectionName() , 'key' => $key , 'query' => $criteria);
        return self::connection()->distinct($query);

    }
1009964
public function countPersonI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collPersonI18nsPartial && !$this->isNew();
        if (null === $this->collPersonI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collPersonI18ns) {
                return 0;
            }

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

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

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

        return count($this->collPersonI18ns);
    }
1250814
public function countRolePermissions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collRolePermissionsPartial && !$this->isNew();
        if (null === $this->collRolePermissions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collRolePermissions) {
                return 0;
            }

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

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

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

        return count($this->collRolePermissions);
    }