code: function (callback) {
      IdentityCounter.findOneAndUpdate(
        { model: settings.model, field: settings.field },
        { count: settings.startAt - settings.incrementBy },
        { new: true }, // new: true specifies that the callback should get the updated counter.
        function (err) {
          if (err) return callback(err);
          callback(null, settings.startAt);
        }
      );
    }
docs: Declare a function to reset counter at the start value - increment value.