title: Number of nodes/edges in a large graph via Gremlin?
body: <p>What is the easiest &amp; most efficient way to count the number of nodes/edges in a large graph via Gremlin?  The best I have found is using the V iterator:</p>
  
  <pre><code>gremlin&gt; g.V.gather{it.size()}
  </code></pre>
  
  <p>However, this is not a viable option for large graphs, per the <a href="http://gremlindocs.com/#transform/v" rel="noreferrer">documentation for V</a>:</p>
  
  <blockquote>
    <p>The vertex iterator for the graph. Utilize this to iterate through all
    the vertices in the graph. Use with care on large graphs unless used
    in combination with a key index lookup.</p>
  </blockquote>