title: How to code @QueryResult class to properly capture cypher result. (Without trial and error)
body: <p>What is the best way to go about defining @QueryResult classes? 
  I have defined a repository method annotated with query like </p>
  
  <pre><code>"MATCH(p:Person{name:{0}) - [r]-(e)
  RETURN distinct label(e) as type ,count(label(e)) as count;"
  </code></pre>
  
  <p>On neo4j console output looks like map.</p>
  
  <pre><code>type count
  ----  -----
  Account 2
  Document 5
  Organization 4
  </code></pre>
  
  <p>So i have defined return type of the method like <code>Map&lt;String, Long&gt;</code> but doesn't work. Then I tried other ways - it returns the counts combined not individual. now am planning to use java driver to solve this problem. What the best way to go about designing <code>@QueryResult</code> to fit my situation. Any resources will be helpful along with the answer to my problem. :)</p>