This question is really hard to answer because it depends on the location, which there are many in Tibia. We can also include some areas nearby which confuse things a bit. This is an estimate when using my source Tibia Wiki -- Library to check how many books are each location I skimmed through the cities. Please note I didn't go to the locations to count the books myself-
Yalahar: 5 excluding the offline training book
Beregar: 1
Vengoth: 8
= Total 14 books
For example, Darashia has 11 books excluding the offline training book, and other areas like Drefia, Blue Djinn and Devourer.
Also, Farmine has 1 book excluding the other areas like Zao Steppe, Dragonblaze Peaks, Muggy Plains. Falcon Bastion, Northern Zao, Razachai.
As you can see, the are some surrounding areas that makes things confusing when determining what the smallest library is. I hope I helped you but also let me know if this needs clarification.