I think you should not change rows to columns...What I estimate from your question is:
You have (should have)
a.) a table EMP with fields
EMP.EMPID
EMP.ANYTHING_OTHER
EMP.THIS_AN_THAT
b.) a table EMP_DTL with fields
EMP_DTL.EMPID
EMP_DTL.EMP_DTL_POS
EMP_DTL.NUMBER
If this assumption is right you can easily solve your request.
SELECT
COUNT(*)
FROM EMP_DTL
WHERE EMP_DTL.EMPID = '001' AND EMP_DTL.NUMBER = 'X'
or better with parameters to count the "X" or the "Y" (query parameter :NUMBER) etc. for any Imp (parameter :EMPID)
SELECT
COUNT(*)
FROM EMP_DTL
WHERE EMP_DTL.EMPID = :EMPID AND EMP_DTL.NUMBER = :NUMBER
And like this you much more possibilities using GROUP BY, HAVING...
Hope I estimated right. Regards.