  Descriptive Complexity has been very successful in characterizing complexity
classes of decision problems in terms of the properties definable in some
logics. However, descriptive complexity for counting complexity classes, such
as FP and #P, has not been systematically studied, and it is not as developed
as its decision counterpart. In this paper, we propose a framework based on
Weighted Logics to address this issue. Specifically, by focusing on the natural
numbers we obtain a logic called Quantitative Second Order Logics (QSO), and
show how some of its fragments can be used to capture fundamental counting
complexity classes such as FP, #P and FPSPACE, among others. We also use QSO to
define a hierarchy inside #P, identifying counting complexity classes with good
closure and approximation properties, and which admit natural complete
problems. Finally, we add recursion to QSO, and show how this extension
naturally captures lower counting complexity classes such as #L.
