hi there. try this array formula:
=SUM(IF(FREQUENCY(IF($B$2:$B$14="John Smith",$A$2:$A$14),$A$2:$A$14)>0,1))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

you may refer the red portion to a cell containing "John Smith" too.