Counting documents that contain substrings more than k times.