'Return the number of nodes in the graph.
Returns
nnodes : int
The number of nodes in the graph.
See Also
order, __len__  which are identical
Examples
>>> G = nx.path_graph(3)  # or DiGraph, MultiGraph, MultiDiGraph, etc
>>> len(G)
3'

def number_of_nodes(self):

    return len(self._node)
