I have a table with col C company and col D Dept. I'm looking for a way on another sheet to tally (return a count) on the number of a specific company and department.

Example...
Col C Col D
Comp1 DeptA
Comp2 DeptB
Comp1 DeptA
Comp1 DeptB

Return for Comp1
DeptA = 2
DeptB = 1

Return for Comp2
DeptB = 1

Hope that's clear on what I'm looking to accomplish. Haven't been able to figure out a formula or nested formulas that will return a Count based on data from two columns of data without creating a new dataset/sheet.