title: CosmosDb count distinct elements
body: <p>Is there a direct function to count distinct elements in a CosmosDb query?</p>
  
  <p>This is the default count:</p>
  
  <pre><code>SELECT value count(c.id) FROM c
  </code></pre>
  
  <p>And distinct works without count:</p>
  
  <pre><code>SELECT distinct c.id FROM c
  </code></pre>
  
  <p>But this returns a Bad Request - Syntax Error:
    <strike><code>SELECT value count(distinct c.id) FROM c</code></strike></p>
  
  <p>How would <code>count</code> and <code>distinct</code> work together?</p>