Yes, SUMPRODUCT normally multiplies 2 or more arrays/ranges and then sums the results but I used it here because it can normally be used without "array entry", so in fact you can use SUM if you want
This part
='sheet with original data'!$B$2:$B$28124='sheet after removing duplicates'!B2
returns an array of TRUE/FALSE values TRUE when the entry matches B2, FALSE when it doesn't
If you then use some mathematical operation on that array which doesn't alter the value, like "double negation" --, or *1 or +0 as I used then that converts the TRUE/FALSE value to 1/0 values and if you sum those you effectively get a count of matches, so you could use
=SUM(('sheet with original data'!$B$2:$B$28124='sheet after removing duplicates'!B2)+0)
or with an IF function like
=SUM(IF('sheet with original data'!$B$2:$B$28124='sheet after removing duplicates'!B2,1,0))
....but both of those (unlike the SUMPRODUCT version) require you to "array enter" the formula, i.e. confirm with CTRL+SHIFT+ENTER
Bookmarks