Where X is a number considerably higher than for Android. Look at the number of years the 3GS has survived and compare that with your average Android phone not getting latest OS updates or any security updates.
But I agree that anyone buying a new phone is stuck with iOS 6.
It depends on what kind of updates you're talking about. OS updates are a problem, but I personally know that the G1 got around 3 years of Maps app updates, and given the current OS version distribution newer devices are likely to do even better than that.
My Motorola droid is able to run Android 4.1 - not a super snappy experience, but it does run. It released in october of 2009. Every feature in 4.1 works on it. I don't have the "fun" apple is pulling with a guessing game on what features work on what phones:
Also, while the 3GS (June 09) is getting ios6, the original ipad (April 2010) is not. Apple will abandon their equipment just as fast if it suits them.