  Weighted counting problems are a natural generalization of counting problems
where a weight is associated with every computational path of polynomial-time
non-deterministic Turing machines and the goal is to compute the sum of the
weights of all paths (instead of just computing the number of accepting paths).
Useful closure properties and plenty of applications make weighted counting
problems interesting. The general definition of these problems captures even
undecidable problems, but it turns out that obtaining an exponentially small
additive approximation is just as hard as solving conventional counting
problems. In many cases such an approximation is sufficient and working with
weighted counting problems tends to be very convenient. We present a structured
view on weighted counting by defining classes that depend on the range of the
function that assigns weights to paths and by showing the relationships between
these different classes. These classes constitute generalizations of the usual
counting problems. Weighted counting allows us to easily cast a number of
famous results of computational complexity in its terms, especially regarding
counting and quantum computation. Moreover, these classes are flexible enough
and capture the complexity of various problems in fields such as probabilistic
graphical models and stochastic combinatorial optimization. Using the weighted
counting terminology and our results, we are able to simplify and answer some
open questions in those fields.
