abstract: The trace formulas are well known for operators with point spectrum. On the other hand, for Schrödinger type operators with continuous spectrum we expect to define the resonances and to obtain trace formulae connecting the trace of some operators with the resonances. I this direction the spectral shift function (SSF) plays the role of the function counting eigenvalues. In these lectures we will present an approach for the trace formulae working for short and long range perturbations. The main result says that the derivative of the SSF modulo regular terms is always a sum of harmonic measures related to the complex resonances and Dirac measures related to the real eigenvalues. Many applications in the physics concerning the distribution of the resonances, Breit-Wigner approximation etc. are closely related to the representation of the derivative of SSF as a sum of measures.