from typing import List


def count_windows(measurements: List[int]) -> int:
    """Count the number of times the total depth of a three-measurement
    window increases.
    """
    total = 0
    first = measurements[0]
    second = measurements[1]
    third = measurements[2]
    past = sum([first, second, third])
    for measurement in measurements[3:]:
        first = second
        second = third
        third = measurement
        new = sum([first, second, third])
        if new > past:
            total += 1
        past = new

    return total