The Warning Counter is a Temporal Diplomacy variable used exclusively in AI to Player Diplomacy. Its purpose is to keep track of previous warnings, and escalate consequences towards the human player on repeated offense. The counter does not care about the type and strength of the warning, any kind will always add exactly one to the variable unless the player passes one of the preliminary check. The Warning Counter can be reset if a positive Diplomatic Reaction stores a positive message - albeit at a very low chance - but such events don't exist, so once the Warning Counter is not zero, it will never change. The 1.50 unofficial patch fixes this and introduces a 1 in 7 chance of resetting every turn when no negative reaction was triggered, as well as implementing a few sources of positive messages. Threatening a wizard increases the counter by one.
If the counter is not zero, any warning automatically results in breaking the active treaty if one exist. Only in the 1.50 unofficial patch, the chance of declaring war increases by 4% times the variable if no treaty was present to break. Due to this, repeatedly angering a wizard in a short amount of time has an escalated chance of War breaking out.
The Warning Counter is not used in AI to AI Diplomacy, as Diplomatic Reactions don't generate warnings for AI players at all. As such, AI players are less likely to go to war over casting hostile spells or committing other negative actions to each other, however, the loss of Visible Relations will eventually lead to it nonetheless.