I'd like to use Arcade to perform a COUNTIF function on my data. For example, if I have the following data, the COUNTIF would return the following count
Type COUNTIF
Apple 2
Apple 2
Orange 1
Banana 1
Importantly, I'd like the count to adjust if the records are filtered. So in the above example if the second Apple record is filtered out, the count for Apple would revert to 1.
Thanks in advance.