public function countChildComponents($select = array())
    {
        Kwf_Benchmark::count('countChildComponents');

        $select = $this->_formatSelect($select);

        if (!$select->hasPart(Kwf_Component_Select::WHERE_GENERATOR)) {
            throw new Kwf_Exception("You can count only for one generator at a time");
        }
        $generators = Kwf_Component_Generator_Abstract::getInstances($this->componentClass, $select);
        return current($generators)->countChildData($this, $select);
    }
public function countChildComponents($select = array())
    {
        Kwf_Benchmark::count('countChildComponents');

        $select = $this->_formatSelect($select);

        if (!$select->hasPart(Kwf_Component_Select::WHERE_GENERATOR)) {
            throw new Kwf_Exception("You can count only for one generator at a time");
        }
        $generators = Kwf_Component_Generator_Abstract::getInstances($this->componentClass, $select);
        return current($generators)->countChildData($this, $select);
    }
public function countChildComponents ( $ select = array ( ) ) { Kwf_Benchmark :: count ( 'countChildComponents' ) ; $ select = $ this -> _formatSelect ( $ select ) ; if ( ! $ select -> hasPart ( Kwf_Component_Select :: WHERE_GENERATOR ) ) { throw new Kwf_Exception ( "You can count only for one generator at a time" ) ; } $ generators = Kwf_Component_Generator_Abstract :: getInstances ( $ this -> componentClass , $ select ) ; return current ( $ generators ) -> countChildData ( $ this , $ select ) ; }
returns the number of child components for a single generator

Only works for a single generator - you have to specify the required generator.

This is much more efficient than count(->getChildComponents()) as it will result in an
SELECT COUNT() sql query

@param array|Kwf_Component_Select
@return int
returns the number of child components for a single generator