title: MongoDB: How to query for records where field is null or not set?
body: <p>I have an <code>Email</code> document which has a <code>sent_at</code> date field:</p>
  
  <pre><code>{
    'sent_at': Date( 1336776254000 )
  }
  </code></pre>
  
  <p>If this <code>Email</code> has not been sent, the <code>sent_at</code> field is either null, or non-existant.</p>
  
  <p>I need to get the count of all sent/unsent <code>Emails</code>. I'm stuck at trying to figure out the right way to query for this information. I think this is the right way to get the sent count:</p>
  
  <pre><code>db.emails.count({sent_at: {$ne: null}})
  </code></pre>
  
  <p>But how should I get the count of the ones that aren't sent?</p>