------
## 最终结论
```python
def count_Squares(m, n):
    total_squares = 0
    for size in range(1, min(m, n) + 1):
        total_squares += (m - size + 1) * (n - size + 1)
    return total_squares

# Test cases
assert count_Squares(4,3) == 20
assert count_Squares(2,2) == 5
assert count_Squares(1,1) == 1
```