def pop_association(Traits):
    """Sets the individuals to their respective populations. 
       Also returns the sample counts per population."""
    
    with open(Traits, 'r') as traits:
        
        Pops = {}
        Pop_counts = {}
        next(traits)
        for line in traits:
            line = line.strip().split()
            Pops[line[0]] = line[1]
            
            if line[1] in Pop_counts:
                Pop_counts[line[1]] += 1
            else:
                Pop_counts[line[1]] = 1
        return Pops, Pop_counts