enchant your library
enchanted library is an artifact creature on the battlefield with power and toughness each equal to the number of cards in it. it's still a library.
if enchanted library would leave the battlefield, exile animate library instead.
Sometimes the books hit back.