All you really need is to set an attribute on the bottle, and call it something like "uses". Then in the use script for the object, first have it check that "object.uses" is less than 5. If it is, use the object as normal and add 1 to the "uses" attribute. If it's equal to 5, display a message that it's empty. So code-wise it would look something like this:
if (object.uses < 5) {
code for what happens when you use the spray bottle
object.uses = object.uses + 1
}
else {
msg ("The bottle is empty.")
}