When you are in design view of the query, click View then Totals. This adds the Total row to the query. From there, add the corresponding field and click on the Total: editbox to get a drop down list of available options. (Group By, Sum, Avg, Min, Max, Count, StDev, Var, First, Last...