in reply to Code requested for array intersection count
How can I find the union/difference/intersection of two arrays? is a good place to look.
Categorized Questions and Answers is your friend.