get number of nodes networkx

JavaScript
len(G)
Source

Also in JavaScript: