getter for number of nodes