Count the Number of Good Subarrays | Leetcode 2537