I am counting repeated messages that exist within 30 days, after which the messages are counted from zero again. For example, in 30 days there were 5 messages type "A", after the last message type "A" passed 30 days and did not report any type "A" a new history of type "A" is born.
What happens to me is that I am adding everything to a dictionary and when a message type "A" is reported again after I did not do it a while ago, the dictionary does not consider the previous story because it replaces it.
I want to print the alert quantities of both stories but it turns out that they have the same name. It is very difficult for me to change the name, since there are thousands of names and the name I use to find the repeated ones.
It will be possible to have a dictionary with elements called the same, but in the background they are different.