from typing import List


def values_in_column(lines: List[str], column: int):
    """
    Scores a potential column by examining its edges and
    counting how many lines of the column are actually
    edges (i.e. transitions between space and non-space
    characters).
    """
    # move to leftmost end of column separator
    leftmost = column
    while leftmost > 0 and all(l[leftmost-1] == ' ' for l in lines):
        leftmost -= 1
    rightmost = column
    while all(len(l) > rightmost + 1 and l[rightmost+1] == ' ' for l in lines):
        rightmost += 1
    lvalues = [False] * len(lines) if leftmost == 0 else (l[leftmost-1] != ' ' for l in lines)
    rvalues = (len(l) > rightmost + 1 and l[rightmost+1] != ' ' for l in lines)
    has_value = (l or r for l,r in zip(lvalues, rvalues))
    return sum(has_value)