Search for a value and find count in a sorted array.