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