Try Tools / Statistics menu command while the board is opened.
That's cool. I did not know that - the elements tab has a total.
This must be the thing I'll be learning today.
My suggestion was going to be use File / Export / Part List, send it to Notepad++ or some editor, cut off the headers and the final blank line and the line count is your part count.
Your way is far quicker,
Geoff