title: Quickest way to count number of repeated leading integers in a list
body: <p>example of list being looked at (list will always be sorted). Size of list is 4^12. 
  [1,1,1,1, ...... , 1,1,4]</p>
  
  <p>At the moment I have a for loop that iterates through the list with a counter until it finds the first non 1 and then breaks and returns the counter. This is quicker than using the count function since the list is already sorted. I am now implementing binary search and I was wondering if anyone can think of a better way to count the number of leading ones in a ordered list. </p>