networkx.Graph.selfloop_edges
networkx.Graph.number_of_nodes
Return the number of nodes.
See also
Graph.order, Graph.__len__