title: Count non-empty input field[]?
body: <p>With jQuery how do I count how many fields of my array field[] are not empty ?</p>
  
  <p>Sample of the input field</p>
  
  <pre><code>&lt;input type="file" name="arquivo[]" id="arquivo"&gt;
  </code></pre>
  
  <p>I was trying to make something up using map and get but it is not coming along well:</p>
  
  <pre><code>var total = 0;
  var count = $('#arquivo[value!=""]').map(function() { total = total+1; }).get();
  </code></pre>
  
  <p>But no matter how many fields I have filled it always end up with the value of 1 and if I have no fields filled 0.</p>