Which dialects would one normally encounter when visiting/living in Japan (in popular places like Tokyo, Kyoto and and so on) or reading something produced in Japan?
The biggest dialects that often come up are.
- Standard Japanese (Tokyo - What TV announcers speak)
- Osaka-ben (Manzai and Comedians)
- Kyoto-ben (Supposedly prettiest female dialect in all of Japan)
- Okinawa-ben (It's totally out there, and is supposedly the closest to orig. Japanese.)
- Hiroshima-ben (more so because of Yakuza and their portrayals in movies)
There are of course more, but these are the ones I Believe you have the highest chances of hearing during Japanese language study or TV watching
Mark Hosang already gave a good answer, so I'll only try to add more detail to it, and maybe generalize the dialect division some more.
It's hard to answer "how many dialects are commonly used", for two reasons:
Dialects are hard to count - you can subdivide dialects (e.g. Kyoto-ben, Osaka-ben, Kobe-ben) or join them into bigger groups (Kansai-ben).
Some dialects are really common and others are really small, some (Osaka-ben) are very much alive and others ("classical" Kyoto-ben) are practically dead, but it's hard to decide where to put the line.
Generally speaking, dialectal variation in Japanese is dying out, but some bigger regional dialects are still quite strong. The following big regional dialects are rather well-known:
Kantō dialect (関東弁) which is centered in Tōkyō and is also the basis for standard Japanese. This is the dialect of central-eastern Honshū (the main island of Japan).
Kansai dialect (関西弁) which is centered around Ōsaka, and is especially identified with its Osaka sub-dialect (大阪弁). This is the dialect of western Honshū.
Tōhoku dialect (東北弁) which is spoken in north-eastern Honshū. It's considered rather rural and rough compared to the urban Kansai and Kanto dialects, and it's often used to characterize Inaka-people in fiction. It's also considered rather slurred and hard to understand, and it's often called Zuzu-ben (because for southern Japanese speakers words such as sushi and susu sound the same when spoken in this dialect). The Japanese spoken in Hokkaidaō is also very similar to this dialect.
Southwestern dialects Here I put everything from Southwestern Honshū (including Hiroshima) to Shikoku and Kyūshū. These dialects (except for Yakuza-style Hiroshima-ben perhaps) are less commonly represented in TV and fiction, and I'm quite bad at differentiating between them, though some of them (especially Kagoshima-ben) are supposed to be quite distinct. Their most striking feature is that most of them use じゃ as copula (instead of や in Kansai and だ in the rest of Japan).
Ryukyuan languages are also worth mentioning (although your unlikely to hear them at all in Tokyo), because they are not really a bunch dialects, but rather a tight language group that shares common roots with Japanese. They are utterly unintelligible to Japanese speakers and share little in common even with the most southern dialects of Kagoshima. Of these languages, the Okinawan language is the most famous, but the sad truth is that practically all of them are mostly being spoken only by older people in the Ryūkyū islands and they are dying out.
I mean ウチナーグチ is often used. TV, music, food and other products, young people...etc. Of course Japanese is used most of the time, it's not like they use uchinaa guchi in everyday conversation. But the traditions stay and it's not a dying language. (at least not when I was there and not in what I've seen recently either when following local news and conversing with friends) Or maybe it's because I'm only acquainted with more traditional people and less average Okinawan (and like me they become old...)