Trues,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<script>
function init() {
function fn(sum,cur) {
return cur.value == "good" ? ++sum : sum
}
var i_am_peremen = Array.prototype.reduce.call(document.querySelectorAll(".i_am_input"), fn, 0)
alert(i_am_peremen)
}
window.onload = init;
</script>
</head>
<body>
<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>
</script>
</body>
</html>