networkx graph get number of nodes