Mental Model
Find where the element starts and ends in the sorted list, then count how many times it appears.
Analogy: Imagine a row of identical books on a shelf sorted by title. To count how many copies of one title are there, find the first copy and the last copy, then count all in between.
Array: [1, 2, 2, 2, 3, 4, 5] Find element: 2 Positions: start ↑ at first 2, end ↑ at last 2