Points in Breps per branch

Hello,
I have a task to solve.
I already managed to solve it but I would like to find a better way. Hope someone can help.

Have a list of points and a list of Breps. Both trees have the same number of branches. Need to find how many Breps per branch contain minimum 3 points of the same index branch.
The method I found involve multiply the total number of points (from 474 to 7584 in this case) so is not very efficient.
You can see the screenshot attached.
Would like to find a method without the need to multiply the number of points.
Thank you.

Francesco