What about the deletion of posts by the user himself, will that also affect the stats of the deleted posts?
It won't, if I understood what you meant as "stats of the deleted posts" to mean whether you'll get into trouble cause you have so many posts deleted (correct me if I'm wrong). users can decide to delete some of their posts they prolly made in the past that they now consider unhelpful and somewhat of a shitpost, I don't think there's anything wrong in that. But then it could also be obnoxious and even an offense if for example the user is on a signature campaign, deletes most of the posts he made in the previous week, to post them them in the current week, that's unethical and can cause problems for such user, thus I can say it's down to the intent of the user, why actually are they deleting their posts, are they turning a new leaf or trying to cheat.
Also, is there a specific number that determines how many posts deleted by a moderator will receive a temporary ban warning? Looks like we need to know a little bit about this.
I don't think there is an actual
specific number, it's prolly something 'arbitrary' on the part of the moderator, if a user has
constantly had quite a lot of posts deleted, then they can give them a ban to see if they would stop shitposting, I also think it could also go down to rank or usefulness of a user, for example a user who has been on the forum for a while, posting fairly good stuff and some shitposts in between that gets deleted all the time, that user would prolly not receive a temporary ban sooner than a newbie who prolly just got to the forum and started posting shit from the beginning.