The word "dialect" when used to describe Chinese is a bit of a misnomer. Dialects are mutually intelligible forms of one language e.g. British English and American English. I, a speaker of American English, can understand the vast majority of what someone from England says to me, even though their accent and some of the terms are different.
On the other hand, if I, speaking Mandarin, try to talk to someone who is speaks Cantonese, we will not be able to communicate very easily unless we start writing notes to each other (as Chinese characters are pretty much standard).
A good analogy would be the romance languages in Europe- they are all closely related and have some degree of mutual intelligibility; however they are not totally mutually intelligible, depending on which two languages are being compared.
A big reason Chinese "dialects" are called dialects instead of "languages" is for political reasons.
The so-called "unity" of the Chinese language and thus of the Chinese culture is a big factor in holding the country together. If you told everybody that they are speaking different (albeit very closely related) languages, it removes a good portion of the glue that holds China together as a country.
Linguistic differentiation along political boundaries is a not uncommon phenomenon. The example of the romance languages is a good one - they are linguistically at least as closely related as Chinese "dialects" but are considered to be different languages because they are spoken in different countries. Another example would be Norwegian and Swedish, or Hindi and Urdu, or Indonesian and Malay, all of which are examples of partially or totally mutually intelligible languages which because they are spoken in different countries (and in some cases written differently) are considered to be different languages even though they are mutually understandable to a greater degree than some Chinese dialects.
These are the main divisions of Chinese dialects:
Mandarin - (known in Chinese by a host of names incl. "Putonghua", "Guoyu", "Guan Hua" etc.) - Mandarin is the most popular dialect in China, being spoken as a first language in the Northeast, Northwest, North-central and West of China by a total of at least 650 million people as well as being spoken as a second language by the rest of the country. Supposedly the most "ideal" Mandarin is spoken in places like Hebei province or in Haerbin, in Heilongjiang province rather than in Beijing because people in Beijing add the "r" sound to the end of too many words. However, Mandarin is still said to be based on the Beijing dialect.
Jin dialects ("Jinyu") - spoken in Shanxi province, very similar to Mandarin except that it also has glottal stops on some words whereas Mandarin does not.
Wu dialects ("Wuyu") - spoken in Shanghai city, Zhejiang province and Jiangsu Province. Examples include Shanghainese, Hangzhou dialect and Suzhou dialect.
Min dialects ("Minyu") - spoken in Fujian, Taiwan and parts of Guangdong province. Examples include Taiwanese and Fuzhou dialect.
Cantonese ("Yueyu", "Guangdonghua") - Spoken in Guangdong and Guangxi provinces. Examples include Guangzhou dialect, Hong Kong dialect and Taishan dialect.
Xiang dialects ("Xiangyu") - spoken in Hunan province.
Hui dialects ("Huiyu") - spoken in Anhui province
Gan dialects ("Ganyu") - spoken in Jiangxi province.
Ping dialects ("pinghua") - spoken in Guangxi province.
Kejia dialects, more commonly known as "Hakka" ("kejiahua") - Spoken by the Hakka, people who migrated from the north several hundred years ago to south China esp. Guangdong. Kejia is linguistically related to other dialects of Chinese, but traditionally because the Hakkas came from the north they were considered migrants and hence "not Chinese" a view which persists into the present.
Some more dialects for the list above:
Chaozhou dialect - spoken in Chaozhou, which is in northern Guangdong province, it is actually not closely related to Cantonese but rather is a type of Min language
Hangzhou dialect - spoken in Hangzhou, Zhejiang province, it sounds similar to Shanghainese, but they have some "r" sounds in it too. One of the Wu dialects.
Ningbo dialect - spoken in Ningbo, sounds even more like Japanese than does Shanghainese, also a Wu dialect.
Xiamen dialect - basically the same as Taiwanese, but it is spoken in Xiamen in Fujian province.
Total population (in mainland China) by language group as of 1989:
A final note is that the node below lists all the languages spoken in China (by both Chinese and minorities) as opposed to being solely a list of Chinese dialects.