Place the two fields on the query grid, then add the second one again (so you have it twice).
In the design view, click the big Sigma icon to turn it into a Totals query. You now have a Totals row in the grid. Leave the first two as Group By, change the third to Count.
Denis