code: function(options) {
          var params = this.toJSON();
          params.limit = 0;
          params.count = 1;
          var request = this._createRequest(params, options);
  
          return request.then(function(response) {
            return response.count;
          });
        }
docs: Counts the number of objects that match this query.
  
  @param {AuthOptions} options
  @return {Promise} A promise that is resolved with the count when
  the query completes.