Merge CountBy and Count functions