public int getNodeCount() {
		int count = 1;
		for (GTreeNode node : children()) {
			count += node.getNodeCount();
		}
		return count;
	}
Returns the total number of nodes in the subtree rooted at this node. Leaf nodes return 1.

@return the number of nodes from this node downward
Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/GTreeNode.java