Your attachment seemed to be empty.
Assuming that you have a bunch of rows with names, and a bunch of columns with attributes such as age and eating preferences
The short answer is that COUNTIF doesn’t do it because it can only handle one condition at a time.
One easy way around this is to create a new column that is equal to your desired condition and count that
e.g. in Z2 the formula =AND(B2=”Apples”,C2=21) would return a result that could be counted.
There are also tricks with array formulae
Finally Pivot Tables are a good general way to do this kind of cross-relationship with ‘database’ data.