onceHandler = function(event) {
            count++;
            if (count === times) {
                self.removeHandler(eventName, onceHandler);
            }
            return handler(event);
        }
Add an event handler to be triggered only once (or a given number of times)
for a given event. It is not removable with removeHandler().
@function
@param {String} eventName - Name of event to register.
@param {OpenSeadragon.EventHandler|OpenSeadragon.AsyncEventHandler} handler - Function to call when event
is triggered.
@param {Object} [userData=null] - Arbitrary object to be passed unchanged
to the handler.
@param {Number} [times=1] - The number of times to handle the event
before removing it.
@param {Number} [priority=0] - Handler priority. By default, all priorities are 0. Higher number = priority.
@returns {Boolean} - True if the handler was added, false if it was rejected