title: How to group and count relationships in cypher neo4j
body: <p>How can I quickly count the number of "posts" made by one person and group them by person in a cypher query? </p>
  
  <p>Basically I have message label nodes and users that posted (Relationship) those messages. I want to count the number of messages posted by each user. </p>
  
  <p>Its a group messages by sender ID and count the number of messages per user.</p>
  
  <p>Here is what I have so far...</p>
  
  <pre><code>START n=node(*) MATCH (u:User)-[r:Posted]-&gt;(m:Message)
  RETURN u, r, count(r)
  ORDER BY count(r)
  LIMIT 10
  </code></pre>