title: Update input field number after counting checkboxes
body: <p>I'm making a form and I'm counting the check boxes that are checked yes or no using <a href="https://stackoverflow.com/questions/3519659/count-the-number-of-checked-check-boxes-and-display-them-on-a-fixed-div-using-jq">this</a> as a guide. I can get the number but it doesn't show in the input field. I see it update looking at the code with firebug. Here's my cut down test code.
      
      </p>
  
  <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt; 
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
          $("input[value=Yes]").each(function () {
          $(this).change(updateCountyes);
          });
  updateCountyes();
      function updateCountyes () {
      var countyes = $("input[value=Yes]:checked").size();
      $("input#item11_number_1").text(countyes);
      $("label#item11").toggle(countyes &gt; 0);
      };
      $("input[value=No]").each(function () {
      $(this).change(updateCountno);
      });
  updateCountno();
      function updateCountno () {
      var countno = $("input[value=No]:checked").size();
      $("input#item12_number_1").text(countno);
      $("label#item12").toggle(countno &gt; 0);
      };
      });&lt;/script&gt;  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input type="checkbox"  value="Yes" /&gt;Yes
  &lt;input type="checkbox"  value="No" /&gt;No
  &lt;input type="checkbox"  value="Yes" /&gt;Yes
  &lt;input type="checkbox"  value="No" /&gt;No
  &lt;div id="item11" class="fb-item fb-100-item-column"&gt;
      &lt;div class="fb-grouplabel"&gt;
        &lt;label style="display: inline;" id="item11_label_0"&gt;Yes&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="fb-input-number"&gt;
        &lt;input type="number" autocomplete="off" data-hint="" placeholder="" step="1" max="999999999" min="0" id="item11_number_1" name="countyes"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div id="item12" class="fb-item fb-100-item-column"&gt;
      &lt;div class="fb-grouplabel"&gt;
        &lt;label style="display: inline;" id="item12_label_0"&gt;No&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="fb-input-number"&gt;
        &lt;input type="number" autocomplete="off" data-hint="" step="1" max="999999999" min="0" id="item12_number_1" name="countno"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>