The Just Jesting hat is earned by
post[ing] 10 comments that each earn an upvote
Whenever I'm the first one to vote to close or flag a question as a duplicate, a comment is automatically generated: "Possible duplicate of $anotherQuestion.". This comment is also upvoted automatically if somebody else votes to close or flags the question as a duplicate (of the same question that I chose).
Do these automatic comments/upvotes count towards the Just Jesting hat or not? If they do, how about comments which were deleted because the duplicate was confirmed (i.e. the question was closed as a duplicate)?
As Sonic notes in the comments, an identical situation happens for comments generated by choosing/typing custom off-topic reasons.