Is there a rule of thumb on the minimum number of hours to fly to avoid corrosion?
To clear up things, there are two types of corrosion: airframe corrosion and engine internal corrosion.
* Airframe corrosion: This is what Jim Hillabrand was talking about. Water/moisture got trapped in the nooks and crannies of the airframe, interacted with the untreated alumininum and developed corrosion, eating away at the airframe. Jim had a 152 that he bought and it had REALLY BAD corrosion inside the wings (see attached picture). A plane that's hangared, out of rain/snow, will likely have less of a corrosion problem than one that's tied down outside.
* Engine internal corrosion: This is when a plane that doesn't get flown long enough ON EACH FLIGHT for the engine internal to get hot enough to burn off/evaporate the water that's created as a by product of the combustion process. That water will cause corrosion on engine parts (cylinders, pistons, cams, etc). The prevention is to fly the plane at least 30 minutes on each flight for the engine/oil to get hot enoug. DON'T crank up the engine in the winter and run it for just a short time then put the plane away. Hangaring doesn't really help preventing engine internal corrosion. Also, flying the plane frequently will keep the engine internal coated with engine oil and prevent engine corrosion. If you can't fly at least once a week, add CamGuard to the oil to keep oil/lubrication on the cam surfaces longer to prevent corrosion of the cams.