Originally Posted by
visitor
My code is 6. I believe it indicates the number of free upgrades you will get during the year.

Code is likely a checksum. It's likely just a digit computed based on your aeroplan number and used for error detection. If you enter your AP number and your Code, if they don't match they know you made a mistake entering your AP number (or, I suppose, your code).
It's probably used by the card reader when it's swiped so it knows the swipe succeeded.