JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' value='N/A'><br>
<input type='text' value='1'><br>
<input type='text' value='N/A'><br>
<input type='text' value='N/A'><br>
<input type='text' value='1'><br>
<input type='text' value='0'><br>
<button>Calculate</button><br><br>
<span id='na'></span><br>
<span id='yes'></span><br>
<span id='no'></span>
JavaScript
$(document).ready(function(){
$('button').click(function(){
var na, yes, no;
na = $(':text[value="N/A"]').length;
$('#na').html("N/A = " + na);
yes = $(':text').filter(function(){return this.value=='1'}).length;
$('#yes').html("Yes = " + yes);
no = $(':text').filter(function(){return this.value=='0'}).length;
$('#no').html("No = " + no);
});
});