title: Increment a counter for only the first click of a button
body: <p>I have multiple buttons on a page, if a button is clicked I want it to count that button only on the first time.  </p>
  
  <p>In the below code snippet I have 3 buttons. If I click the buttons more than once it increments the counter multiple times, how do I only get the first click back. So based on below my counter should only rise up till 3 and nothing more</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var counter=0;
  function count()
  {
    $('.show').addClass("notification");
              $(".show").html(counter);
  }
   $('.btn').on('click',function(){
        counter++
        count();
   })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.notification {
      position: absolute;
      
      display: block;
      text-align: center;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: -1px;
      width: auto;
      min-width: 8px;
      /*height: 9px;*/
      line-height: 5px;
      padding: 5px;
      border-radius: 50%;
      color: #fff;
      box-shadow: 1px 1px 5px #000;
      border: 2px solid #fff;
      background-color: #b60000;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div&gt;
  &lt;button class='btn'&gt;Click&lt;/button&gt;
  &lt;button class='btn'&gt;Click&lt;/button&gt;
  &lt;button class='btn'&gt;Click&lt;/button&gt;
  &lt;/div&gt;
  &lt;span class="show"&gt;</code></pre>
  </div>
  </div>
  </p>