def count_occupied(m: list) -> int:
    """Return how many seats are occupied in parameter map."""
    count = 0
    for r in m:
        for c in r:
            if c == '#':
                count += 1
    return count