That's what this Wikipedia chart says:
It's interactive, you can have the chart sort by any of the headings. If you click on "Country," it will sort alphabetically by country.
21 incidents in China from occurring 1995 through 2012
17 incidents in the U.S. occurring from 1927 (yes, that's 1927 ) through 2012.
Apparently much of the information on this chart about China is not widely known in the West. Even Wikipedia doesn't seem to know it elsewhere. For instance, if you Google for "school attacks China," what you might end up seeing at Wikipedia is this page, School attacks in China (2010–2012) which makes it seem they have just started happening in China. That page even talks about the "copycat" factor, without picking up that there was a big cluster of these killings in China in 2004, cited on the chart page.
The China citations on the chart are all footnoted, though many are Chinese news sources which makes it hard for those of us who don't know Chinese to verify them. But I did check the edits on the page and all prior to 2012 seem to have been put there when the page was created in June, 2011 (by a contributor with the pseudonym Lord Gen, who has now bitterly retired from Wikipedia.) Unlike with the incidents of many other countries, only the most recent incidents have links to individual Wikipedia pages with more information, but the information on the chart is pretty complete, indicating full reading of the source.
Note the criteria for inclusion stated at the top of the page. It does seem to request that entries concerning workplace-related killings with child "collateral damage" be kept out. It's just school massacre attempts by crazies.
If this is true, shouldn't scholars of these crimes be studying this more instead of jumping to conclusions about why it happens in the U.S. using U.S. data only? I.E.: this happens in the because the U.S. is a more violent society; this happens in the U.S. because of how children are raised now; this continues to happens in the U.S. because of how we have react to it; this happens in the U.S. because of video games or psychoactive drugs....?
One can easily make the presumption from the chart that the lack of access to firearms in China makes the death counts lower. So no need to argue about that. One can also easily make the assumption, if one knows a bit about China's health care system, that mental illness is treated even more poorly there than the U.S., so there's that.
But this calls into question a lot of assumptions that are automatically made about school massacres in the U.S. That it has to do with our special relationship with violence in society as a whole, or that it has to do with lax punishment, or that it has to do with lots of attention from the media. The latter is one assumption I have made, the "fame" factor, and now this chart has me wondering about that.... Maybe it's just pure and simple a factor of one kind of mental illness. It would take more difficult research of Chinese sources to know how much the "copycat" factor could be involved in each case, because in China the government is known to control some of the coverage of this type of thing.
On to a general thoughts raised by this chart. Check out how widespread these incidents are geographically, and consider the population size for each country listed in your judgments. We are not that special in this regard as we are often made out to be, our incidents just have more damage from guns thrown into the mix. Also a suggestion: try sorting the chart by date, and you will see strong clusters (China's clusters are especially prominent.)