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);
        }
    }
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);
        }
    }
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 ) ; } }
Gets number of children for the given node

@param      Criteria  $criteria Criteria to filter results.
@param      ConnectionInterface $con Connection to use.
@return     int       Number of children
Gets number of children for the given node