How to create an object that can be used only a few times?