*One* way of doing it is like this.
How it works:
In the column uniques apart from the first line (which is just the data value), there is a MATCH function that checks if the data value is found anywhere above that line (note the slightly tricky array reference with the first row absolute). If not, it will return error value N/A. The IFNA function tests for that error value, and either returns the data or an empty string.
In the column count, if uniques is non-blank not an empty string, it uses the COUNTIF function to count the number of occurrences of it within the data