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

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

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

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

        return count($this->collPositions);
    }
public function countPositions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collPositionsPartial && !$this->isNew();
        if (null === $this->collPositions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collPositions) {
                return 0;
            }

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

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

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

        return count($this->collPositions);
    }
public function countPositions ( Criteria $ criteria = null , $ distinct = false , ConnectionInterface $ con = null ) { $ partial = $ this -> collPositionsPartial && ! $ this -> isNew ( ) ; if ( null === $ this -> collPositions || null !== $ criteria || $ partial ) { if ( $ this -> isNew ( ) && null === $ this -> collPositions ) { return 0 ; } if ( $ partial && ! $ criteria ) { return count ( $ this -> getPositions ( ) ) ; } $ query = ChildPositionQuery :: create ( null , $ criteria ) ; if ( $ distinct ) { $ query -> distinct ( ) ; } return $ query -> filterBySport ( $ this ) -> count ( $ con ) ; } return count ( $ this -> collPositions ) ; }
Returns the number of related Position objects.

@param      Criteria $criteria
@param      boolean $distinct
@param      ConnectionInterface $con
@return int             Count of related Position objects.
@throws PropelException
Returns the number of related Position objects .