I'm pretty sure a combinaison of COUNTIFS, SUMPRODUCT, VLOOKUP, INDEX or MATCH would do the trick, but really I can't get in Excel logic and not able to do it. The closest matches I found are this and this, but I was not able to transpose it. Help much appreciated.
Here is a sample of problem with expected output in yellow. So for instance, E2 is the number of value greater than 1 we found in range B2:B7 for which product is equal to A.
Sorry F3 is wrong, it should be 2 (we have 2 value of B product greater than 2)