title: How do I do a WHERE clause on a COUNT in Cypher?
body: <p>This is what I'm trying:</p>
  
  <pre><code>match 
  (e:Person) - [r] - (f:Person) 
  where (count(r) &gt; 5 AND count (r) &lt;10) 
  return id(e), e.name; 
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>QueryExecutionKernelException: Invalid use of aggregating function count(...) in this context
  </code></pre>
  
  <p>Basically I'm wanting to find a Person who is related to between 5 and 10 other Persons.</p>