They obviously know how much traffic they send to it. But how do they know of the rest of the traffic to it? Is it only if it has Google Analytics installed, or do they get their information in some other way as well?
First, let's clear up a misconception in the other answers: Google search does not use Google Analytics in any way for ranking.
Matt Cutts at Google confirmed this years ago. And if you think about it logically, for the most part it does not make sense for them to use that data for two reasons: (1) most sites get most of their traffic from Google, so looking at their GA stats is meaningless; (2) it would definitely be seen as an anti-competitive and monopolistic move (forcing all sites to use GA in order to get good rankings in Google search).
They may use some other sources like Joshak suggested, but many of those would fall into category 2 above.
In reality, they don't need to know how much actual traffic a site is getting. The PageRank algorithm approximates that very well - i.e. more links from higher quality sites = more traffic. There are cases where a web site is well publicised in "real life" such as in TV and newspaper adverts and other promotions. But again, that will end up equating to more links and a bigger online presence anyway.
EDIT: your question is a bit misleading, but as per the comment you gave on your question.. here is my answer.
Page Views / Traffic is only tracked via Google Analytics, but that doesn't mean that your site wont get indexed anymore. You will gain page rank even without google analytics via the amount of link backs (other sites linking back to you) thus your site will then get crawled by google because of that. then google will be aware that your site exists. adding GA would speed up the process of google discovering your website but it is not required, though recommended.
But take note that google search is also being tracked so if your site is always being clicked on a search result.. it sort of acts the same way as an inbound traffic.
Google has a lot of ways to collect data about you and your website. They can tell how much traffic you get via Google search and Google analytics (as you mentioned) they also have android, gmail, chome browser, chrome OS, Google reader (for a little longer at least), youtube, and Google plus just to name a few sources. You don't need to rely on GA to get your site noticed... they will find you ;-)