Could you please clarify what you mean by this:

I have attached a simplified excel file in relation to the above formula. What I am trying to achieve is for the array formula to count all duplicate values, expect for any text values which equal both "e" and "f".
Would these values be included or excluded?

e
f
ef
ecf
cf
ec

Thanks.