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

You are given a 0-indexed integer array nums. A pair of indices (i, j) is a bad pair if i < j and j - i != nums[j] - nums[i].
Return the total number of bad pairs in nums.
 
Please complete the following python code precisely:
```python
class Solution:
    def countBadPairs(self, nums: List[int]) -> int:
```