Swat/SwatTreeNode.php
public function count()
    {
        $count = 1;
        foreach ($this->children as $child) {
            $count += count($child);
        }

        return $count;
    }
public function count()
    {
        $count = 1;
        foreach ($this->children as $child) {
            $count += count($child);
        }

        return $count;
    }
public function count ( ) { $ count = 1 ; foreach ( $ this -> children as $ child ) { $ count += count ( $ child ) ; } return $ count ; }
Gets the number of nodes in this tree or subtree

This method is needed to fulfill the Countable interface.

@return integer the number of nodes in this tree or subtree.
Gets the number of nodes in this tree or subtree