Now we can use this library to log a message when something happens, but I'd like to be able to quickly insert a line of code here and there to count how often something happens. Ideally, this would allow multiple things to be counted, so each would need to have a name. One way to implement this would be to mis-use resources (now that they're represented as global variables).
Note that this library is for semipure operations intended for debugging and similar, not for semantically significant code.