def count_missense_per_gene(lines):
    """ count the number of missense variants in each gene.
    """
    
    counts = {}
    for x in lines:
        x = x.split("\t")
        gene = x[0]
        consequence = x[3]
        
        if gene not in counts:
            counts[gene] = 0
        
        if consequence != "missense_variant":
            continue
        
        counts[gene] += 1
    
    return counts