title: promise pending error in mongodb and nodejs
body: <p>I have written node.js code for getting some number using mongodb database.this is my code for that </p>
  
  <pre><code>    MongoClient.connect('mongodb://localhost:27017/mongomart', function(err, db) {
  
      assert.equal(null, err);
  
      var numItems=db.collection('item').find({"category":category}).count();
  
      callback(numItems);
  });
  </code></pre>
  
  <p>This mongodb query runs correct on mongo shell but it is giving error when using with node.js</p>
  
  <pre><code>Promise &lt;Pending&gt;
  </code></pre>
  
  <p>I don't know what is this "promise" ? Please help..</p>