Count the number of occurrences in a sorted array

NoSuchKey