Help with do a search

Hello Guys,

So I have a data field which equals to a list of dates. This data field is within a thing. And I have a element which has another list of dates. I want to do a search for “thing” where the “field” dates intersect with the element list of dates “count”. But because I have multiple things I want to do a sum of that count from item 1 till n. (To do an average afterwards). My problem is that if I simple just do a search for that first data field intersect with list of dates, no matter how many the “count” of that action can be, the maximum will always be the ammount of dates in the second element, because the intersect action eliminates duplicates dates. So I was wondering If there is a way to calculate individualy from 1 to n, that intersect count, based on constraints on the search.