I have a table with two columns
col_A and col_B
select * from table where col_A = something_A
You can count how many times each selection criterion matches:
SELECT SUM(CASE WHEN col_A = 'something A' THEN 1 END) AS MatchesA, SUM(CASE WHEN col_B = 'something B' THEN 1 END) AS MatchesB FROM table
1 if the condition passes or
NULL if it doesn't. The 1 is summed; the null is ignored.