The largest intelligence agency on the planet doesn't work for a country, but for a political party. The Chinese Ministry of State Security (MSS) technically works for China, but when officials reach a certain level in the bureaucracy, they are informed that the primary function of the MSS is to insure the survival and well being of the Chinese Communist Party.
The size (in personnel and budget) is classified. But just looking at the range of activities in the MSS, it's apparent that there must be several hundred thousand people involved. For example, the main sections (or "bureaus") of the MSS deal with; Recruiting and Personnel, Foreign Intelligence (overseas spies), "Hong Kong, Macau and Taiwan" (keeps an eye on these three areas), Technology (for spying, including satellites), Local Intelligence (collects information inside China), Counterintelligence (seeks out foreign espionage inside China), Circulation (double checks intelligence collected, and prepares and distributes reports), Institute of Contemporary International Relations (a research organization), Anti-Defection and Countersurveillance (works against foreign efforts to recruit Chinese for spying, especially members of the MSS), Scientific and Technological Information (steals foreign technology), IT (Information Technology, controls use of computers inside the MSS, and their use for all sorts of things), and Foreign Affairs (cooperation with foreign intelligence agencies).
The MSS has been very successful at stealing foreign technology. We know this because so much of it shows up in products manufactured in China and exported. China has also been more successful than Russia (during the Cold War) in preventing its citizens from defecting to the West. Not completely successful, and a growing number of MSS officials are fleeing China, and intelligence work. A major reason for these defections is the realization that MSS is fighting a losing battle trying to control the Chinese population. The most visible aspect of this is the 30,000 Ministry of Public Security employees working for the Golden Shield Project (known unofficially as The Great Firewall of China). The main job of these MSS personnel is to monitor Internet use throughout the country, and prevent "troublesome" Internet data from getting in, or out, of China. Since 1998, over a billion dollars has been spent on this effort. While many pundits praise the success of the Golden Shield, the Great Firewall has not kept dangerous (to the Communist Party) from entering or leaving the country.
The MSS has had greater success in getting agents into foreign intelligence organizations, usually by using ethnic Chinese who already work there. However, the Chinese appear to fear that some of these spies have been turned, and are actually working for the nation they are living in. Such paranoia is also growing inside China, as more Chinese realize how much effort the MSS expending to keep the Chinese population ignorant of the rest of the world, and obedient to their Communist Party masters.