def get_token_counts(df, col_name):
    """
    Given a DataFrame column containing lists of tokens, this returns
    a dictionary of all tokens and the number of times they appear in
    the column.
    """
    counts = {}
    for tokens in df[col_name]:
        for token in tokens:
            count = counts.get(token)
            if count is None:
                count = 0
            counts[token] = count + 1
    return counts