My worksheet looks likes this:

A B
1 Name Fruit
2 Sam Apple
3 Sam Apple
4 Sam Apple
5 Sam Orange
6 Jane Orange
7 Jane Apple
8 Jim Orange
9 Jim Orange

I would like a function/formula that tells me how many Apples Sam has.

thank you!