The second "had" is optional, depending on whether you wish to imply that not having the books preceded the wishing. The books are items which you can count. "
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.