.count(search, function(err,data){
    if (err) {
      if(cb) cb(err);
      res.json(500, err);
      return;