def _count_PIS(seqsamp, N):
counts = [Counter(col) for col in seqsamp.T if not ("<STR_LIT:->" in col or "<STR_LIT:N>" in col)]<EOL>pis = [i.most_common(<NUM_LIT:2>)[<NUM_LIT:1>][<NUM_LIT:1>] > <NUM_LIT:1> for i in counts if len(i.most_common(<NUM_LIT:2>))><NUM_LIT:1>]<EOL>if sum(pis) >= N:<EOL><INDENT>return sum(pis)<EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>
filters for loci with >= N PIS