Why is it bad to judge a paper by citation count? I hear a lot from the experts that citation count is a bad idea as a measure of judging a paper. This seems simply counter-intuitive to me. I would like to know if any study has been done in this direction?
I do not know of any study in this field, but I have a hunch that the following points apply (without any particular order, just numbered for convenience in the case of comments/replies):


Opportunity for citation: A paper that presents the ultimate answer to a problem is probably more valuable than a paper that presents just an unfinished attempt at solving the same problem. Yet, the latter is much easier to build upon (because it still leaves obvious extension points) and thus might be cited much more frequently.
Meaning of citations: There is no rule that a paper needs to be cited positively. If a paper has an obvious flaw, this may give rise to a number of other papers that just cite the flawed paper to point out what they are about to prove wrong or do better.
Citation scope: Referencing a paper does not mean referencing the whole paper, or its core finding. A reference to a paper might mean that the whole paper is pointed out as related work, or it could just mean that the second half of a particular statement in the introduction section is pointed out as related. A citation can well point out a remark that is completely marginal to the referenced paper, but that the citing author deemed to explain the fact in question particularly well, or that made a particularly recent mention of an old topic (to show the topic is still of interest).
Not all citations are equal: The question whether something is or is not cited hinges on its relative relevance compared to other citations, based on the available space left in the current paper format, not on the global importance of the work.
Citation habits differ: Even within one (sub-)field, citation habits differ wildly between conferences and authors. This is in part due to different paper formats and length restrictions (see previous point), but also simply because some authors are much more willing to throw in citations every now and then than others. Such habits can even vary for a single author, based on "strategic" considerations for the intended final target audience of the paper.
Citations can be transitive: Authors occasionally face situations where they can either list several examples of related work, or cite a single overview paper (e.g. a state of the art report), to give an overview over some basics or otherwise related topic. The latter case is clearly more space-efficient and possibly more helpful (as the overview paper is designed to give an overview while at the same time conveying the information somewhat in-depth, which often cannot be done in a single sentence of a related work section), but does not increase the citation count of the works referenced in the overview paper.
Papers are not atomic: There is no "natural" clustering of research questions, solutions, works and experiments. How many or how few findings go into/are allowed in a single published work is mostly a matter of style and personal preference of authors and program chairs. With that in mind, any particular finding may be presented in a single paper (which gets N citations), or split up into N papers (each of which may get only one citation). Thus, while the number of citations in this example may give a hint about the importance of each of the single written documents, it does not say much about the importance of the actual set of research questions.
Citation count is not normalized by field/community: As correctly pointed out by Cephalopod, '"What constitutes many depends on the field". Groundbreaking work in a narrow field might never get many citations.' Likewise, fields where publishing small bite-sized papers at a high frequency is common naturally amass a much larger total amount of citations than fields where publications are very seldom and, when they occur, cover a large amount of progress, discussion and findings.
Citation tweaking: As any metric, defining such a single factor for measuring performance, citation count is prone to abuse. If an author suspects citation count to be beneficial, there is an incentive to self-cite (or cyclically cite each other within an institute), and possibly even break up publications into smaller parts (related to the practice of salami slicing) to have more opportunities for those extra citations. As it can be assumed that some authors are already doing that, this renders citation count even less reliable as a quality indicator, as the "training data set" that would be used for comparison is already skewed.
Citation count ≠ citation count: The citation count itself is not a reliable measure to start with, as different sources will provide different citation counts, depending on what citations (and what kinds of documents that contain citations) are counted:


Citations in a book can be counted by chapter (point in favour of this: If each chapter is written by a different (group of) author(s), every chapter has its individual list of citations), or for the whole book (point in favour of this: A book tends to have a certain focused topic, and - more so than e.g. conference proceedings - all chapters tend to follow a common "narrative", so some central works are likely to be referenced in various chapters).
If possibly predatory journals are included, a variant of item 9 can ensue in which citations in less reputable sources (that are counted nonetheless) are bought, as pointed out by ff524.
Citation counts can include citations from totally legitimate works, which are nonetheless of a vastly different status compared to peer-reviewed publications. For example, Google Scholar sometimes seems to count student Bachelor and Master theses and other documents created while studying if the university's digital library that provides a copy of every such submitted document happens to be crawled by Google.

External factors influence selection of cited works: If there is one particular finding in one particular work that is appropriate to cite, there is no question that that particular paper will be cited. However, often enough, things are much more vague - there are various eligible papers that allude to the same statement in different ways, and it is not at all clear which one is preferrable to cite. At this point, external factors that are rather arbitrary can directly influence whether or not a work is cited. For instance, the older paper might be cited to show the original finding ... but the more recent paper might also be cited instead to show that the topic in question is still of interest in recent works. The older paper might be chosen because it is the original reference, or the more recent paper at the more highly-valued venue might be chosen to make the reference stronger, or yet another paper might be chosen because it contains the more comprehensible explanation. Lastly, depending on the citation style, even space may be an issue - if an author is fighting for the last few lines to stay within the allowable page limit, at least in APA style, a paper by Li et al. has an inherent advantage over one by Miller and Bowman, one by Miller and Bowman has an advantage over one by Erdenebileg and Papadopoulos, and one by Erdenebileg and Papadopoulos has an inherent advantage over a paper by Russell-Rodriguez and Pennington-Kiesewetter.