The subjective sweetness of a wine is determined by the interaction of several factors, including the amount of sugar in the wine to be sure, but also the relative levels of alcohol, acids, and tannins. Briefly: sugars and alcohol enhance a wine's sweetness; acids (sourness) and bitter tannins counteract it. These principles are outlined in the classic work by Emile Peynaud, The Taste of Wine.
Residual sugar is usually measured in grams of sugar per litre of wine, often abbreviated to g/l or g/L. Even among the driest wines, it is rare to find wines with a level of less than 1 g/L, due to the unfermentability of certain types of sugars, such as pentose. By contrast, any wine with over 45 g/L would be considered sweet, though many of the great sweet wines have levels much higher than this. For example, the great vintages of Château d'Yquem contain between 100 and 150 g/L of residual sugar. The sweetest form of the Tokaji, the Eszencia – contains over 450 g/L, with exceptional vintages registering 900 g/L. Such wines are balanced by carefully developed use of acidity. This means that the finest sweet wines are made with grape varieties that keep their acidity even at very high ripeness levels, such as Riesling and Chenin Blanc. How sweet a wine will taste is also controlled by factors such as the acidity and alcohol levels, the amount of tannin present, and whether the wine is sparkling or not. (Wikipedia 2012)