Counts the elements in tree with this node as the root.

@deprecated
@return the number of elements
775304
@Deprecated
	public int count() {
		int count = (clusteringFeature != null) ? 1 : 0;
		for (ClusteringTreeNode child : children) {
			count += child.count();
		}
		return count;
	}
1323561
@SuppressWarnings("UnusedDeclaration")
    public int getNestedChildCount() {
        ArrayList<Account> stack = new ArrayList<Account>();
        int size = 0;

        stack.add(this);
        while (stack.size() > 0) {
            Account current = stack.get(0);
            stack.remove(0);
            for (Account child : current.getChildren()) {
                size++;
                if (child.hasChildren())
                    stack.add(child);
            }
        }

        return size;
    }
201088
function(nodes) {
      for (var i = 0, node; node = nodes[i]; i++)
        node._counted = true;
      return nodes;
    }
13712
public int[][] getSets() {
        int n = 0;
        for (int i = 0; i < forest.length; i++) {
            if (forest[i] < 0) {
                n++;
            }
        }
        int[][] sets = new int[n][];
        int currentSet = 0;
        for (int i = 0; i < forest.length; i++) {
            if (forest[i] < 0) {
                int setSize = 1 - forest[i] - 1;
                sets[currentSet] = new int[setSize];
                int currentIndex = 0;
                for (int element = 0; element < forest.length; element++) {
                    if (getRoot(element) == i) {
                        sets[currentSet][currentIndex] = element;
                        currentIndex++;
                    }
                }
                currentSet++;
            }
        }
        return sets;
    }
130412
@Override
    public int getRowCount() {
        String xpath = bodyTag.isPresent()
            ? "./tbody/tr"
            : "./tr";

        return getContext().find().elements(byInner(By.xpath(xpath))).size();
    }
1205821
public void gotoEnd() {
	currentNode = tree;
	while (currentNode.hasChildren()) {
	    currentNode = currentNode.getChildren().get(
		    currentNode.getChildren().size() - 1);
	}
    }
55902
protected int getNextNode()
  {
    if (null != m_exprObj)
    {
      m_lastFetched = m_exprObj.nextNode();
    }
    else
      m_lastFetched = DTM.NULL;

    return m_lastFetched;
  }
1114347
public int length(){
		if(root.child==null){
			return 0;
		}
		if(length>-1){
			return length;
		}
		length=root.getChildCount();
		return length;
	}
1072143
public static <T> T root(TreeDef.Parented<T> treeDef, T node) {
		T lastParent;
		T parent = node;
		do {
			lastParent = parent;
			parent = treeDef.parentOf(lastParent);
		} while (parent != null);
		return lastParent;
	}
777878
public function count()
    {
        if($this->elements instanceof \Countable) {
            return $this->elements->count();
        }

        $count = 0;

        foreach($this->elements as $value) {
            $count++;
        }

        return $count;
    }
97162
int getPreviouslyCounted(XPathContext support, int node)
  {

    int n = m_countNodes.size();

    m_countResult = 0;

    for (int i = n - 1; i >= 0; i--)
    {
      int countedNode = m_countNodes.elementAt(i);

      if (node == countedNode)
      {

        // Since the list is in backwards order, the count is 
        // how many are in the rest of the list.
        m_countResult = i + 1 + m_countNodesStartCount;

        break;
      }
      
      DTM dtm = support.getDTM(countedNode);

      // Try to see if the given node falls after the counted node...
      // if it does, don't keep searching backwards.
      if (dtm.isNodeAfter(countedNode, node))
        break;
    }

    return m_countResult;
  }
402106
function() {
                var nodes, i, node, self = this;
                // Remove all children
                if (self.firstChild) {
                    nodes = [];
                    // Collect the children
                    for (node = self.firstChild; node; node = walk(node, self)) {
                        nodes.push(node);
                    }
                    // Remove the children
                    i = nodes.length;
                    while (i--) {
                        node = nodes[i];
                        node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;
                    }
                }
                self.firstChild = self.lastChild = null;
                return self;
            }
962118
public function count()
    {
        $count = 1;
        foreach ($this->children as $child) {
            $count += count($child);
        }

        return $count;
    }
867067
private void countDescendants() throws TTIOException {
        long descendants = 1;
        final long nodeKey = mRtx.getNode().getDataKey();
        if (((ITreeStructData)mRtx.getNode()).hasFirstChild()) {
            mRtx.moveTo(((ITreeStructData)mRtx.getNode()).getFirstChildKey());
            do {
                descendants += mDescendants.get(mRtx.getNode());
            } while (((ITreeStructData)mRtx.getNode()).hasRightSibling()
                && mRtx.moveTo(((ITreeStructData)mRtx.getNode()).getRightSiblingKey()));
        }
        mRtx.moveTo(nodeKey);
        mDescendants.put(mRtx.getNode(), descendants);
    }
481174
public TreeElement[] getChildren()
    {
        if (_children == null)
            return EMPTY_TREE;
        TreeElement results[] = new TreeElement[_children.size()];
        return (TreeElement[]) _children.toArray(results);
    }
174418
int getLast()
  {

    int size = m_countNodes.size();

    return (size > 0) ? m_countNodes.elementAt(size - 1) : DTM.NULL;
  }
1170093
int traverseAndCountElements() {
		int num = 0;

		for (Entry<?, ?> entry : table) {
			while (entry != null) {
				num++;
				entry = entry.next;
			}
		}

		return num;
	}