have a field for each customer table called 'currently_renting' (or something) This value get's 1 added when they rent a book, and one subtracted when a book comes back.
The total of this will be how many books are out by customer, and if a rental query goes ahead, then it must be only if 'currently_renting' < 4....
Just an idea