With MySQL, speed isn't always created from reducing the number of queries (in other RDBMSs this usually isn't the case).
The idea with creating the temp table is to do a few things: have MySQL only do the grouping and counting ONCE. Then you have that data tossed in a temp table (which really means you're tossing it in RAM which is usually uber-fast). Then when you run your 4 queries, the brunt of the work has already been done and the query time should be pretty fast.
Although without testing, this can be easily argued. It depends on how your data is structured and how much of it you're dealing with.