def part2(data: list[str]):
    """Counts the number of times the sum of the last
    3 depth measurements increases

    :param data: list of depths as strings
    :return: number of increases"""
    depths = list(map(int, data))
    counter = 0
    last = sum(depths[0:3])

    for i in range(2, len(depths)):
        window_depth = sum(depths[i - 2 : i + 1])
        if window_depth > last:
            counter += 1
        last = window_depth

    return counter