```python
def cell_count(grid: list, value: int) -> int:
    if not grid:
        return 0
    if not grid[0]:
        return 0
    return sum(cell == value for row in grid for cell in row)
```