------
## 最终结论
```python
def count_light_status(n, m):
    if n == 0:
        return 1  # Only one state: all lights are off
    if m == 0:
        return 1  # Only one state: all lights remain on

    if n == 1:
        return 2 if m > 0 else 1
    elif n == 2:
        return min(4, m * 2 + 1)
    else:
        return min(8, m * 2 + 4)

# Example usage:
print(count_light_status(1, 1))  # Output: 2
print(count_light_status(2, 1))  # Output: 3
print(count_light_status(3, 1))  # Output: 4
```