def count_genes(person, one_gene, two_genes):
    """
    Subfunction within joint_probability and update to count the number of copies
    of the gene of interest that a given person carries.
    """
    if person in one_gene:
        return 1
    elif person in two_genes:
        return 2
    else:
        return 0