i want to monitor events to occur and save with name for example "M42" to tinyDB and make one count any time envent "M42" do occur it add one more count.
eg. events counts
-------- ------------
A 6
B 8
Use the event name as a tag, and the count as a value, default 0.
Do not use any global variables for this.