Edit in JSFiddle

function btnClickHandler(event) {
    this.numberOfTimesClicked++;
    log("The button has been clicked " + this.numberOfTimesClicked + " time(s)");
}

function btnClickTracker() {
    this.numberOfTimesClicked = 0;

    return this;
}

var button = document.getElementById("ourBtn");
var tracker = new btnClickTracker();

button.addEventListener("click", btnClickHandler.bind(tracker));
<button id="ourBtn">Click Me!</button>

<div id="log"></div>

              
            
          
            
              

External resources loaded into this fiddle: