Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an integer array nums and an integer k, return the number of pairs (i, j) where i < j such that |nums[i] - nums[j]| == k.
The value of |x| is defined as:

x if x >= 0.
-x if x < 0.

 
Please complete the following python code precisely:
```python
class Solution:
    def countKDifference(self, nums: List[int], k: int) -> int:
```