I think the "members" of this forum have convinced themselves that with the current facilities available in Numbers, adding a column is the
only solution. Remember, though, this doesn't need to be visible; the column can be hidden or squirreled away in a separate table on another sheet.
The second argument to COUNTIF() is not "rich"; it needs to be an expression that evaluates, oddly, to a string complying to a restricted syntax. All the major spreadsheets, Excel included, I've used have this same restriction (in fact, I suspect Numbers COUNTIF() functionality is taken directly from Excel for compatibility reasons). Excel does, though, provide an additional feature, arrays, that is often used to work around this deficiency in COUNTIF(), but that is not available in Numbers.