Gets the number of nodes in a tree.
a Node
which types of children are to be counted, one of g_traverse_all, g_traverse_leaves and g_traverse_non_leaves
the number of nodes in the tree