Count Subarrays Where Max Element Appears at Least K Times | dStruct