title: Count inputs number onchange
body: <p>i have a little problem with my code, i need to count inputs when change the value, my code is working but when i used the increase button the count dont change the value.</p>
  
  <p>HTML CODE:</p>
  
  <pre><code>&lt;div class="input-group input-number-group"&gt;
    &lt;div class="input-group-button"&gt;
      &lt;span class="input-number-decrement"&gt;-&lt;/span&gt;
    &lt;/div&gt;
    &lt;input class="input-number" type="number" value="1" min="0" max="1000"  onchange="count(this.value);"&gt;
    &lt;div class="input-group-button"&gt;
      &lt;span class="input-number-increment"&gt;+&lt;/span&gt;
    &lt;/div&gt;  
  &lt;/div&gt;
  &lt;div class="input-group input-number-group"&gt;
  &lt;input class="input-number" type="text" id="totalcount" placeholder="0" /&gt;
  &lt;/div&gt;
  
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>JS CODE:</p>
  
  <pre><code>$('.input-number-increment').click(function() {
    var $input = $(this).parents('.input-number-group').find('.input-number');
    var val = parseInt($input.val(), 10);
    $input.val(val + 1);
  });
  
  $('.input-number-decrement').click(function() {
    var $input = $(this).parents('.input-number-group').find('.input-number');
    var val = parseInt($input.val(), 10);
    $input.val(val - 1);
  })
  
  /* Count. */
  function count(value) {
      var Total = 0;  
      value = parseInt(value); // Convertir a numero entero (número).
      Total = document.getElementById('totalcount').value;
      // Valida y pone en cero "0".
      Total = (Total == null || Total == undefined || Total == "") ? 0 : Total;
      /* Variable genrando la suma. */
      Total = (parseInt(Total) + parseInt(value));
      // Escribir el resultado en una etiqueta "span".
      document.getElementById('totalcount').value = Total;
  }
  </code></pre>
  
  <p><a href="https://jsfiddle.net/k1hs904b/" rel="nofollow noreferrer">Here is the fiddle</a></p>
  
  <p>I need to count when i press the + or rest when i press - button, any idea?</p>
  
  <p>Thank so much.</p>