title: Group and count with condition
body: <p>I'm trying to group a set of documents and count them based on their value:</p>
  <pre><code>{ item: &quot;abc1&quot;, value: 1 }
  { item: &quot;abc1&quot;, value: 1 }
  { item: &quot;abc1&quot;, value: 11 }
  { item: &quot;xyz1&quot;, value: 2 }
  </code></pre>
  <p>I would like to group by <code>item</code> and get in return a count of how many times the <code>value</code> is bigger than <code>10</code> and how many times smaller:</p>
  <pre><code>{ item: &quot;abc1&quot;, countSmaller: 2, countBigger: 1 }
  { item: &quot;xyz1&quot;, countSmaller: 1, countBigger: 0 }
  </code></pre>