eventually succeeded in resolving this. Effectively, Filter() cannot recognize">&" as a wildcard, so we add an if statement to check for that. Next, we use ISNUMBER(MATCH()) to determine whether an item is included in the list.
Here is the complete phrase for the cell below, where you can insert a picture description to see the result:
=SUM(COUNTA(UNIQUE(FILTER(L10:L18, (IF($R$6="<>&", TRUE, ISNUMBER(MATCH(P10:P18,$R$6,0))))*(IF($R$5="<>&", TRUE, ISNUMBER(MATCH(O10:O18,$R$5,0))))))))
I hope this helps you.