def count_trees(area_data: list, down: int, right: int) -> int:
    """Count the trees you would hit on a straight trajectory

    :param area_data: List containing a map of tree locations
    :param down: Number of units down per step
    :param right: Number of units right per step
    :return: Total number of trees hit
    """
    width = len(area_data[0])
    count = 0
    for i, line in enumerate(area_data[::down]):
        count += line[(right * i) % width] == '#'
    return count