add proper COUNTIFS implementation