By my calculations, there are about 17 million faculty members and graduate students in the world: 11 million graduate students and 6 million faculty members.
# of graduate students
The data about graduate students comes from the NSF Science and Engineering Indicators report. According to this table in the report, there are 600,000 graduate students in the US in science and engineering fields. According to this table, science and engineering degrees represent 22% of the total. So there are therefore 2.7 million graduate students in the US.
According to this page of the report, the United States represents 25% of the researchers in the world. This means that there are 2.7 *4 = 10.8 million graduate students in the world.
# of faculty members
According to the Bureau of Labor Statistics, there are 1.7 million teaching personnel at universities in the US. If you exclude teaching assistants, who tend to be graduate students, that number comes down to 1.54 million. Assuming that the US has ¼ of the world’s faculty members, there are 1.54 * 4 = 6.16 million faculty members in the world.
Size of science and engineering workforce
Another interesting stat is the size of the science and engineering workforce. According to this page of the NSF report, 12.9 million people in the US say that their job requires their science and engineering degree. Assuming that the United States is ¼ of the global numbers, then the global science and engineering workforce is 12.9 *4 = 51.6 million people.
Of this 51.6 million figure, 6.8 million are teaching personnel at universities (1.7 million * 4), and 44.8 million are in the private sector.