title: python count number of ones in a binary image
body: <p>What is the python module to count number of ones in a binary image ? </p>
  
  <p>to rephrase, </p>
  
  <p>I have a matrix that has only ones and zeros, it's of numpy array type and I want to know how many ones are there.</p>