Does "head" mean the same thing in these two sentences?

His horse won by a head.

He is two heads taller than his little sister.
the same meaning