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

Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid.
 
Please complete the following python code precisely:
```python
class Solution:
    def countNegatives(self, grid: List[List[int]]) -> int:
```