結果 : count occurrences in sorted array python