MONGODB-NODEJS-DRIVER, DANSTICATIONWARNING: Collection.Count est obsolète

db.collection("posts").countDocuments(
  {}, // filters
  {}, // options
  function(error, result) {
    console.log(result);
  }
);
Mappy Show