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