I think I found a solution for you, but it requires you to add a row of headers above all of your data. Once that's done, use the formula below in I2. It should be array-entered (confirmed with ctrl + shift + enter instead of enter), then filled right through L2 and down:
=INDEX(A$2:A$15,MIN(IF(IF(COUNTIFS($I$1:$I1,$A$2:$A$15,$J$1:$J1,$B$2:$B$15,$K$1:$K1,$C$2:$C$15,$L$1:$L1,$D$2:$D$15)=0,COUNTIFS($A$2:$A$15,$A$2:$A$15,$B$2:$B$15,$B$2:$B$15,$C$2:$C$15,$C$2:$C$15,$D$2:$D$15,$D$2:$D$15))=LARGE(IF(COUNTIFS($I$1:$I1,$A$2:$A$15,$J$1:$J1,$B$2:$B$15,$K$1:$K1,$C$2:$C$15,$L$1:$L1,$D$2:$D$15)=0,COUNTIFS($A$2:$A$15,$A$2:$A$15,$B$2:$B$15,$B$2:$B$15,$C$2:$C$15,$C$2:$C$15,$D$2:$D$15,$D$2:$D$15)),1),ROW($A$2:$A$15)-ROW($A$2)+1)))
Fill it right and down through L5 (or farther, if you want more than the top 4). You can use the following in M2 (non-array) to count the number of appearances:
=COUNTIFS($A$2:$A$15,$I2,$B$2:$B$15,$J2,$C$2:$C$15,$K2,$D$2:$D$15,$L2)
For the other group, just adjust the formulas for the new range, so array-enter the following in T2:
=INDEX(N$2:N$15,MIN(IF(IF(COUNTIFS($T$1:$T1,$N$2:$N$15,$U$1:$U1,$O$2:$O$15,$V$1:$V1,$P$2:$P$15)=0,COUNTIFS($N$2:$N$15,$N$2:$N$15,$O$2:$O$15,$O$2:$O$15,$P$2:$P$15,$P$2:$P$15))=LARGE(IF(COUNTIFS($T$1:$T1,$N$2:$N$15,$U$1:$U1,$O$2:$O$15,$V$1:$V1,$P$2:$P$15)=0,COUNTIFS($N$2:$N$15,$N$2:$N$15,$O$2:$O$15,$O$2:$O$15,$P$2:$P$15,$P$2:$P$15)),1),ROW($N$2:$N$15)-ROW($N$2)+1)))
and fill right through V and down. Then in W2 (non-array):
=COUNTIFS($N$2:$N$15,$T2,$O$2:$O$15,$U2,$P$2:$P$15,$V2)
I think this setup returns the values you're looking for. It's also worth noting that my formulas do not depend at all on columns E:H or Q:S, so you can delete those sections if you like. The formulas simply return the top occurring matches in each set of initial values. Take a look at the attachment to see if it works as desired:
Bookmarks