Number of occurances in sorted array