OK, you've gotten some really good posts about how magnets work in theory. I'll try not to reproduce that here so no one gets bored, but I thought a little clarification was necessary.

Other (external) magnetic fields can degauss a magnet if they are varied either with electric currents (such as with an electric degausser) or through motion (where you take a stronger magnet and move it over the weaker one repeatedly). Magnets that can float freely (e.g. a compass needle) as they jangle around in your pocket can orient themselves with the external magnet and will most likely not have their domains realigned.

Physical force can destroy a permanent magnet. For example, beating a magnet with a hammer will send shock waves through the metal that will cause the domains to realign. Physically bending a magnet back and forth in several places can have the same effect. Heating a magnet can demagnetize it as well, in this case the thermal energy is sufficient to randomize the domains as the individual atoms start vibrating faster... we're talking a few hundred degrees or more here.

The short answer to your question is that none of the jostling or the presence of other weak magnets are probably going to be enough to hurt your compass.

Trying to take a reading in the proximity of all that other metal is a different issue, be careful about that. The safest thing would be to detach your compass from the keyring before trying to take reading with it.

Hope this helps.