The way to have variables track picking up ten objects is very similar to tracking killing ten monsters.
Use the Variables tut, say you have played before and go to this room.
Pick up all the books. Pay attention.
Then go look at the code for it.
Do you understand all that?
Then depending on how you set up your monster battles, you just change the variable at the time of battles.
Unless you want to make a difference between battles and number of monsters, in which some battles have multiple monsters.
Then you need to have a separate help request. Or if you have more questions. Good luck.