Returns the number of related SmartyFilterI18n objects.

@param      Criteria $criteria
@param      boolean $distinct
@param      ConnectionInterface $con
@return int             Count of related SmartyFilterI18n objects.
@throws PropelException
344082
public function countSmartyFilterI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collSmartyFilterI18nsPartial && !$this->isNew();
        if (null === $this->collSmartyFilterI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collSmartyFilterI18ns) {
                return 0;
            }

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

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

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

        return count($this->collSmartyFilterI18ns);
    }
516747
public function countApiLogs(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collApiLogsPartial && !$this->isNew();
        if (null === $this->collApiLogs || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collApiLogs) {
                return 0;
            }

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

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

        return count($this->collApiLogs);
    }
1044512
public function countFeatureFeatureTypes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collFeatureFeatureTypesPartial && !$this->isNew();
        if (null === $this->collFeatureFeatureTypes || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collFeatureFeatureTypes) {
                return 0;
            }

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

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

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

        return count($this->collFeatureFeatureTypes);
    }
958328
public function count($criteria=null)
	{
		$query=new CJoinQuery($this,$criteria);
		// ensure only one big join statement is used
		$this->_finder->baseLimited=false;
		$this->_finder->joinAll=true;
		$this->buildQuery($query);

		$query->limit=$query->offset=-1;

		if(!empty($criteria->group) || !empty($criteria->having))
		{
			$query->orders = array();
			$command=$query->createCommand($this->_builder);
			$sql=$command->getText();
			$sql="SELECT COUNT(*) FROM ({$sql}) sq";
			$command->setText($sql);
			$command->params=$query->params;
			return $command->queryScalar();
		}
		else
		{
			$select=is_array($criteria->select) ? implode(',',$criteria->select) : $criteria->select;
			if($select!=='*' && preg_match('/^count\s*\(/i',trim($select)))
				$query->selects=array($select);
			elseif(is_string($this->_table->primaryKey))
			{
				$prefix=$this->getColumnPrefix();
				$schema=$this->_builder->getSchema();
				$column=$prefix.$schema->quoteColumnName($this->_table->primaryKey);
				$query->selects=array("COUNT(DISTINCT $column)");
			}
			else
				$query->selects=array("COUNT(*)");

			$query->orders=$query->groups=$query->havings=array();
			$command=$query->createCommand($this->_builder);
			return $command->queryScalar();
		}
	}
1142089
public function countDealerProductVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerProductVersionsPartial && !$this->isNew();
        if (null === $this->collDealerProductVersions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerProductVersions) {
                return 0;
            }

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

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

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

        return count($this->collDealerProductVersions);
    }
155920
public function getFirstChild(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if ($this->isLeaf()) {
            return null;
        } else {
            return ChildCategoryQuery::create(null, $criteria)
                ->childrenOf($this)
                ->orderByBranch()
                ->findOne($con);
        }
    }
823275
public static function queryCount( ezpContentCriteria $criteria )
    {
        $fetchParams = self::translateFetchParams( $criteria );
        $count = eZContentObjectTreeNode::subTreeCountByNodeID( $fetchParams->params, $fetchParams->rootNodeId );
        return $count;
    }
535375
public function countUserRoles(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collUserRolesPartial && !$this->isNew();
        if (null === $this->collUserRoles || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collUserRoles) {
                return 0;
            }

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

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

        return count($this->collUserRoles);
    }
149864
public static function count($criteria = array())
    {
        self::processCriteriaWithType($criteria);
        $count = self::connection()->count(self::collectionName(), $criteria);
        return $count;
    }
701930
public function countChildren(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if (null === $this->collNestedSetChildren || null !== $criteria) {
            if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
                return 0;
            } else {
                return ChildCategoryQuery::create(null, $criteria)
                    ->childrenOf($this)
                    ->count($con);
            }
        } else {
            return count($this->collNestedSetChildren);
        }
    }
934950
public function count($column = null, $distinct = true)
	{
		$this->add_soft_filter();
		return parent::count($column, $distinct);
	}
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);
    }
634171
public function countDealerI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerI18nsPartial && !$this->isNew();
        if (null === $this->collDealerI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerI18ns) {
                return 0;
            }

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

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

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

        return count($this->collDealerI18ns);
    }
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);
    }
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);
    }
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);
    }
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);
    }