How about using a where clause?
SELECT COUNT(p.pname)
FROM programmer as p
WHERE
p.proficiancy1 = c OR p.proficiancy1 = c
Since I have no clue from the little that your question contained I can not really say what c is supposed to be since you didn't take care to tell us what type the "proficiency" fields are made of. BTW, you also forgot to tell us the kind of RDBMS you are using. Your tag "ASP.net" doesn't really help either.
Regards,
— Manfred