title: Count all values in a matrix less than a value
body: <p>I have to count all the values in a matrix (2-d array) that are less than 200.</p>
  <p>The code I wrote down for this is:</p>
  <pre><code>za=0   
  p31 = numpy.asarray(o31)   
  for i in range(o31.size[0]):   
      for j in range(o32.size[1]):   
          if p31[i,j]&lt;200:   
              za=za+1   
  print za
  </code></pre>
  <p><code>o31</code> is an image and I am converting it into a matrix and then finding the values.</p>
  <p>Is there a simpler way to do this?</p>