The TreeView_CountNodes() function returns the entire number of nodes in a tree view field.
TreeView_CountNodes(tree_view_field)
• tree_view_field – The tree view field whose nodes will be counted.
A long integer containing the number of nodes in the tree, including nodes that are not visible. This value does not include the invisible node TV_ROOT.