from typing import List


def count_occupied_seats(layout: List[List[str]]) -> int:
    """
    Count quantity of occupied seats in a given layout

    :param layout: seat layout
    :return: quantity of occupied seats
    """

    occupied_seats = sum(sum(1 for seat in r if seat == '#') for r in layout)
    return occupied_seats