Check criteria in one column and count in other column with different values