title: Count total items in mongoDB collection/database
body: <p>I can't seem to find the answer to this. I wan't a simple return statement of the amount (total) items in my collections.</p>
  
  <pre><code>var mongojs = require('mongojs');
  var db = mongojs("myadb",['myadb']);
  db.myadb.count(function(used,a){
      console.log(used,a);
  });
  </code></pre>
  
  <p>Null is return. I'm using a mongodb JS library for node and yes, there is records in the database (12)</p>
  
  <p><a href="http://mafintosh.github.io/mongojs/" rel="nofollow">The documentation states that:</a></p>
  
  <pre><code>cursor.count(callback)
  </code></pre>
  
  <p>Thanks.</p>