Given an integer array `nums` and an integer `k`, return the number of contiguous subarrays whose elements sum to exactly k.