title: GroupBy using GremlinPipeline with OrientDB
body: <p>I'm using the Java embedded version of OrientDB and I wanted to execute some gremlin queries.
  So I'm using GremlinPipeline to do this.
  I was wondering how to do a groupBy.</p>
  
  <p>Say each vertice contains a property "age", I want to do a group by on this property.</p>
  
  <p>I tried doing following :</p>
  
  <pre><code>List a = new GremlinPipeline(graphDb.getVertices()).groupBy(new PipeFunction&lt;Vertex, String&gt;() {
                                                              public String compute(Vertex vertex) {
                                                                     return "age";
                                                              }}, new PipeFunction&lt;Vertex, Integer&gt;() {
                                                              public Integer compute(Vertex vertex) {
                                                                     return vertex.getProperty("age");
                                                              }}).toList();
  System.out.println(a.toString());
  </code></pre>
  
  <p>But it's returning me all the vertices instead. </p>
  
  <p>How to group them and count the number of items inside a group according to the property "age" ?</p>