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