title: MongoDB's count() incorrectly returns 0 if a query is given
body: <p>Our database is currently running and everything seems to fine. I wanted to do some statistics so I did some standard calls. Basically I wanted the number of some specific data.</p>
  
  <p>First some basic calls to show you that there actually is data in the database.</p>
  
  <pre><code>&gt; db.files.count()
  814639
  
  &gt; db.files.find({"migrated":true})
  { "migrated" : true, "filename" : "bleh",... }
  ...
  </code></pre>
  
  <p>So clearly there's data, and the call returns it. Now I want to find out how many results there is, but I get this:</p>
  
  <pre><code>&gt; db.files.count({"migrated":true})        
  0
  </code></pre>
  
  <p>And I did this too:</p>
  
  <pre><code>&gt; db.files.find({"migrated":true}).count()
  0
  </code></pre>
  
  <p>Is there anyone who has any idea why this could be happening?</p>
  
  <p>The versions is:</p>
  
  <pre><code>&gt; db.version()
  1.8.1
  </code></pre>
  
  <p>Any help would be much appreciated</p>