title: Counting number of values between interval
body: <p>Is there any efficient way in python to count the times an array of numbers is between certain intervals? the number of intervals i will be using may get quite large</p>
  
  <p>like:</p>
  
  <pre><code>mylist = [4,4,1,18,2,15,6,14,2,16,2,17,12,3,12,4,15,5,17]
  
  some function(mylist, startpoints):
     # startpoints = [0,10,20]
     count values in range [0,9]
     count values in range [10-19]
  
  output = [9,10]
  </code></pre>