After answering a question, I realized that my answer didn't really solve the problem, so I decided to delete it while I thought a bit more about the problem and how to solve it. I made some changes, undeleted the answer, but after more thinking I deleted it again, to finally undelete it permanently.
In the edit history, I can see my deletion/undeletions:
And in my profile, I can see that those deletions/undeletions are counted towards the votes I cast:
Why is that? Do they really count for receiving badges? If it happens (Civil Duty doesn't specify anything about own content as the Copy Editor does), it seems a bit counterproductive.
I have done deletion/undeletion on my own answers in the past, and now I feel like I have broken some SO/SE rule without realizing. Are there any rules/restrictions on when to delete/undelete own content? (and where could I read about it)