networkx.Graph.number_of_nodes
networkx.Graph.size
Return the number of nodes. Use “len(G)”.
Examples
>>> G=nx.path_graph(4) >>> print len(G) 4