title: Count lines up from the bottom when 2nd column goes non-zero
body: <p>Here is a subset of a file for gnuplot with time in secs from 1/1/2000 and daily rainfall in mm:</p>
  
  <pre><code>        559008000   13.500000    
          559094400   2.4000001    
          559180800  0.60000002    
          559267200   13.800000    
          559353600   6.3000002    
          559440000  0.30000001    
          559526400   0.0000000    
          559612800   0.0000000    
          559699200   0.0000000    
          559785600   0.0000000    
  </code></pre>
  
  <p>I want to find the number of days since it rained (it's 4).
  First step is to reverse the file:</p>
  
  <pre><code>tac rainfile.txt
  </code></pre>
  
  <p>Now I'm looking for the first non-zero entry in column 2.</p>
  
  <pre><code>tac rainfile.txt | awk '$2 == "0.0000000" {++count} END {print count}'
  </code></pre>
  
  <p>gives me the total number of lines with zero, but how do I stop counting when I first hit a non-zero value?</p>