Find Duplicate?

I have a dataset that have 2 columns (ID and Treat). I would like to find how many time Treat occurs in the table. I was able to use the Sort component to find the duplicate but it will require merging with the original data. I am not very familiar with scripting in Pipeline Pilot. Is this something that can be done using scripting? Thank you!