title: Count instances using selector
body: <p>I have this piece of code:</p>
  
  <pre><code>var loppNum = parseInt(jQuery('#seire_ulatus_tabel input[name*="sisestusSeireVahemikLopp_"]')
     .filter(function () {
         return this.value != "";
     })
     .length);
  </code></pre>
  
  <p>Is there a way i can use jQuery selector to select all rows that have one or the other field or both fields filled? I have 2 fields on a row. Each row must be counted once.</p>
  
  <p>Im using grails. I have a template where are 2 inputfields. Using this template i can render the rows where needed. I need to be able to count how many rows have atleast 1 field filled.</p>