Check out this very nice infographic of space launches by country and year:
Of the 7,000 spacecraft that have been launched into orbit or beyond, more than half were defense satellites used for such purposes as communication, navigation, and imaging. (The Soviet Union sent up a huge number, partly because its satellites tended to be much shorter-lived than those from the United States.)