<input type='text' class='i_am_input' value='good'>
<input type='text' class='i_am_input' value='bad'>
<input type='text' class='i_am_input' value='good'>
<input type='text' class='i_am_input' value='bad'>
<input type='text' class='i_am_input' value='good'>
<script>window.onload = function(){
alert(document.querySelectorAll('.i_am_input[value="good"]').length);
};</script>