What type of processing does Unity do when importing character animations?

I'm trying to figure out the memory impact of adding a few extra hand/finger bones to our character skeleton.

As far as I understand Unity will re-sample and optimize animations at import time, but is the optimization done for the animation as a whole or per bone? For example, assuming that we add a few bones to the hand and that these bones will not animate in most of the animations. Will Unity detect this and only store one key-frame (per animation) for each bone that isn't animated?

I believe that assumption is correct. You could of course, bake the animations as well.

If you are using Unity 2.6 or later you can easily see the result of Unity's keyframe reduction by looking at the animations in the Animation View. What you see there is a proper representation of the curves after keyframe reduction (if it is enabled).

Keyframe reduction, when turned on in the animation import settings, is on a per-property basis, which is even more granular than per-bone because keyframes for e.g. position and rotation can be reduced independently. Generally, properties that have no motion at all will be reduced to two keyframes (curves with a single keyframe are not supported).

You can also leave out curves for some properties entirely. For example, you can leave out curves for bones in the hands, if the hands are irrelevant for a given animation. If you make your animations separately - i.e. not as frame ranges in a single animation but as different files - then you can control on a per-animation basis which properties should have curves and which shouldn't.