Beachfront, or very close to the beach, 5 years is the rule of thumb for an outdoor unit. Ten if you're a few hundred yards back, the unit is sheltered (i.e. on the opposite side of the house from the beach) and you periodically hose off the fins of the coil to remove salt buildup (hose gently...do not use high-pressure or you might remove the fins themselves if they are old enough).
Air handlers (the indoor unit) are less of a problem since they're inside, but if you are replacing a unit that is 5 or 10 years old, then you will likely have to replace the air handler as well. The industry was forced to switch from R-22 type freon to R-410 about a year or two ago, and an R-22 air handler cannot be attached to an R-410 outdoor unit, so both pieces typically have to be replaced.
There are a few dealers who have a handful of R-22 outdoor units left, but they're going fast.
I was afraid that our AC system was going to need to be replaced, when it went out, last weekend! This development was built in '02 and a number of others, have needed to be replaced! Fortunately, ours only needed a $40 Capacitator part and the $65 service call. We also had to replace a dryer heating element at $45 and labor for both, was only $75! Terry Schrader with Terry's AC Heat and Appliance/Santa Rosa Beach, was fantastic! He came same day, was prompt, very fast and professional! If you ever need an appliance repair, Terry may be reached at 850-267-9956, you'll be glad you did!