try in r3 filled down
=SUM(--(I3:N3=$E$5:$E$31)) array entered with ctrl+shift+enter