try:
=ARRAYFORMULA(QUERY(UNIQUE({D:D, D:D&E:E, E:E}),
"select Col1,count(Col1)
where Col3 != ''
group by Col1
order by count(Col1) desc
label count(Col1)'Count'", 1))
[![0][1]][1]
[1]: https://i.stack.imgur.com/RFyOx.png
try:
=ARRAYFORMULA(QUERY(D:D&{"",""},
"select Col1,count(Col2)
where Col1 != ''
group by Col1
order by count(Col2) desc
label count(Col2)'Count'", 1))
[![0][1]][1]
[1]: https://i.stack.imgur.com/tPasa.png