Filtering and reducing the raw data with a Counter object