Count Occurrences In Sorted Array Leetcode