Rather than giving it a set number of charges remaining, you assign to it a die — anything from a d2 to a d1,000,000,000,000.
Every time the macguffin is used, the die is rolled: if a 1 turns up, it fizzles, fails to operate, and is out of charges from that point.
This system has two advantages:
- First, it adds a degree of uncertainty to the use of magical gew-gaws. I don't imagine them coming with a little read-out showing exactly how much fuel is left in the tank, and I don't think the characters using the thing should have that information either.
- Second, it reduces the amount of record-keeping that either the player or the GM has to remember to keep track of.
The easiest thing, from the GM's point of view, is to just let the player know which die they should be rolling to activate the thingumajig. The down-side to that (if it is, in fact, a down-side) is that it gives them some information about the state of charge of the doohickey.
The slightly more tiresome method is for the GM to secretly roll the die every time they attempt to use the framistat. The possibility here is that an unscrupulous GM might take advantage of the secrecy to remove from his or her campaign a magical splandlefloopit that is causing them irritation.
My personal choice would generally be the former, but that's mainly because I'm really very lazy.