Hi
you can try sum function as CSE formula with array of parameters as below:
h3={SUM(--(B3:F3={2,3,5,7,11}))}
and you can do the same for the other cells as well.
Note: Do not enter "{}" manually, it will be applied on pressing Cntr+Shift+Enter keys. At the same time, you need to manually type "{}"
Regards,
Prasad DN