Count Occurrences in Sorted Array

Given a sorted array and a target, return the number of times the target appears.

Difficulty:

Console