Philip Elmer-DeWitt at Apple 2.0 has published a chart demonstrating unit sales of Macs vs PCs over the last nine years. While the industry suffered as a whole, as did so many others, Apple sold more Macs in that span. You'll notice an off-the-chart dip in 2005-2006, which coincides with the Intel transition; a time when many users stopped buying as they waited for the new machines (The first Intel iMacs were released in January 2006).
During that waiting period, Apple relied on iPod sales. By the time iPod sales slowed, shoppers were buying Macs again. Likewise, as the current recession prevented many customers from buying Macs, the iPhone sustained Apple. It will be interesting to see what the iPad has done in another year.
The Mac Observer's Alexis W. Cabot has his own interpretation of this data. "Macs have been on a roll ever since I have comparable data, with an exception during the [2005-2006] Intel transition," he says. "This proves either that value is always in high demand, or that we will always have the rich among us."