NumberOfNodes function

Number of nodes