nnodes function

Counts the number of nodes (Vertices) in a tree