def get_col_count(in_file):
    """
    Count number of columns (separated by TAB) in first row and return
    number.

    >>> in_file = "test_data/test1.bed"
    >>> get_col_count(in_file)
    6
    >>> in_file = "test_data/tr_list.txt"
    >>> get_col_count(in_file)
    1
    >>> in_file = "test_data/empty_file"
    >>> get_col_count(in_file)
    0

    """

    col_c = 0
    with open(in_file) as f:
        for line in f:
            cols = line.strip().split("\t")
            col_c = len(cols)
            break
    f.closed
    return col_c