What should we do with these kinds of spams?
You can always flag it as not-constructive if you feel it is harmful to future visitors.
I sometimes flag comments as obsolete if there are a lot of unnecessary ones on a question or an answer, cluttering up the page. Comments aren't intended to be permanent (which is why clarifications in comments should be edited into the appropriate question/answer).
To begin I think we need to clarify what "spam" is. Wikipedia once again to the rescue: "Spam is the use of electronic messaging systems to send unsolicited bulk messages indiscriminately." As the comment that has prompted your question was not sent in bulk, or indiscriminately it is not technically "spam". I will give you the benefit of the doubt and assume that you meant "inappropriate".
Now to answer your question. With any comment that you feel is inappropriate, you can simply flag it for a moderator's attention. When you do you can select the following reasons:
If, however, you feel that is not sufficient, there are a couple other options you have. One is to add a comment of your own, and you can say why you feel the comment is inappropriate. You can either comment directly on the question (or answer as the case may be). For example, in this case you might say: "I would like to clarify that the above comment is false. Although the reading is the same, the meaning does not mean 'thank you', but actually 'ten ants'."
Alternatively you could use the @ symbol to respond directly to the commenter, for example you might say: "@silvermaple: That is wrong, please stop lying to everyone. People use this site for learning, please don't teach them things that are wrong. For those of you who are not aware, 蟻が十 means '10 ants' not 'thank you."
Another suggestion would be to try and engage people (particularly the errant commenter) in the chat room. This has the added benefits of allowing a back-and-forth, and get people in the habit of using our poor, underused chat room. It would be a good idea to try to address the commenter directly, but without a IM system on SE sites, I can see how this might be difficult to do.
Yet another way of handling a comment that you don't like would be to post a meta question like, "What should we do with comments such as these?". Don't just ask a question and provide a link to a comment as a reference, but post a screenshot of the entire question and circle the comment in red. That way everyone knows exactly what you mean, and there can be no confusion. However, before you do so, please make sure that it is an actual problem that the community faces. By this I mean that if such a behavior continues, it can result in the degradation of the site as a whole.
I am aware that my advice may seem biased, but I what I put above is, for the most part, my honest advice (particularly the last two sentences of the last paragraph, if not the paragraph as a whole). I'm sorry if my sarcastic streak that shone through at the end offended anybody. The rest of this post is my personal feelings on my comment and the attention it has received.
I would first like to say that I in no way meant to mislead anyone in my comment. I know humor can be lost on the internet, and especially when it's dry, like mine. I did try to word it such that it would be understood that it was meant in jest, but I see now that it was very subtle and perhaps not easily picked up by non-native English speakers (and that is particularly important as not everyone who uses this site is a native speaker). That is also why I commented and did not actually post it as an answer. In retrospect I would have not posted my little play-on-words as a mock-answer, but perhaps as an anecdote of when I first heard it (from a Buddhist monk of all people).
I understand the need for seriousness. This is especially true as we are still in beta and trying to not devolve into a Reddit clone. What we are also trying to do is make this site accessible to learners. Learning a new language, any new language, is hard work, and I can say from experience that the level of professionalism, and the spirit of cooperation on this site is absolutely phenomenal. I can't say studying Japanese would be impossible without coming here, but it certainly has made it easier and more comfortable having this community helping me and studying along with me. The only real problem I have coming here is that sometimes it can feel a little too restricted and/or elitist. We trying to help each other, not put each other down, even while we maintain a standard of behavior.
The last thing I want to do is destroy the site with a little joke. That being said, I feel that along with the hard work, long hours, and the considerable frustration that comes with learning a language, the process has to also be fun. You have to want to learn a language, otherwise it won't take. That's the reason (or one of the reasons) that many people (I'm including myself in this) can spend years in language classroom and be unable to communicate in the target language, yet still pass a test. It's because they are forced to learn it. Of course, no one is forced to come to JLU (I hope), but I think that by trying to dampen the spirit good-naturedness or humor is detrimental to the site. I am in no way, shape, or form trying to say that we should be cracking jokes around every corner. I don't think we should start posting sarcastic comments on every other question. If so it could potentially become a serious problem, I fully agree on that.
However, the comment I made was one comment. That's all. Meant in the spirit of humor, not disinformation. It made me laugh when I first heard it, I was just trying to do the same for you folks here. I'm sorry if it came across wrong, and I'm sorry you felt the need to post this on meta.
I certainly wouldn't call it a spam comment, as it's from a regular user and intended as a joke rather than anything malicious. At worst it's potentially misleading to beginner-level visitors. If you think that's the case then maybe post a reply clarifying that it's incorrect?