SELECT count(*), column1, column2 from table_name
group by column1, column2;