How to create a table with counts of category combinations?

How to create a table with counts of category combinations?