# number_of_nodes¶

MultiGraph.number_of_nodes()

Return the number of nodes in the graph.

Returns: nnodes : int The number of nodes in the graph.

>>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc