Write a function to find the max count in a sorted array.
Assume the input is a nondecreasing list of integers, and return the largest number of times any single value appears. Use the signature def max_count(nums):; return an integer, including 0 when the input list is empty.
def max_count(nums):