in reply to Counting matches

Yes, it's possible. But your question is fuzzy.

Could you show us what you tried our at least sample data?