Revisions including speed bumps, 22.
Models that have redisgned internals excluding speed bumps, 11.
Models that look different, 8.
I may have missing one or two, but I think that's all of them.
A thing about the numbers above, I counted different models of one iMac generation as one. Example: the 20" and 1.25Ghz 17" iMac G4 are one. The 350Mhz and 600Mhz iMac G3 are one (except for the speed bumped numbers).