title: gremlin query to retrieve vertices which are having multiple edges between them
body: <p><a href="https://i.stack.imgur.com/uaJNP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uaJNP.png" alt="enter image description here"></a></p>
  
  <p>Consider the above graph. I would like a gremlin query that returns all nodes that have multiple edges between them as shown in the graph.</p>
  
  <p><strong>this graph was obtained using neo4j cypher query:</strong>
  <strong>MATCH (d:dest)-[r]-(n:cust) 
    WITH d,n, count(r) as popular
    RETURN d, n
    ORDER BY popular desc LIMIT 5</strong></p>
  
  <p><strong>for example:</strong>
  between <strong>RITUPRAKA... and Asia</strong> there are 8 multiple edges hence the query has returned the 2 nodes along with the edges, similarly for other nodes.</p>
  
  <p><strong>Note:</strong> the graph has other nodes with only a single edge between them, these nodes will not be returned.</p>
  
  <p>I would like same thing in <strong>gremlin</strong>.</p>
  
  <p><strong>I have used given below query</strong>
  g.V().as('out').out().as('in').select('out','in').groupCount().unfold().filter(select(values).is(gt(1))).select(keys)</p>
  
  <p><strong>it is displaying
       out:v[1234],in:v[3456] .....</strong></p>
  
  <p><strong>but instead of displaying Ids of the node I want to display values of the node
      like  out:ICIC1234,in:HDFC234</strong></p>
  
  <p><strong>I have modified query as 
     g.V().values("name").as('out').out().as('in').values("name").select('out','in').
  groupCount().unfold().filter(select(values).is(gt(1))).select(keys)</strong></p>
  
  <p>but it is showing the error like classcastException, each vertex to be traversed use indexes for fast iteration</p>