  It has been shown recently that spectral flow admits a natural integer-valued
extension to essential spectrum. This extension admits four different
interpretations; two of them are singular spectral shift function and total
resonance index. In this work we study resonance index outside essential
spectrum.
  Among results of this paper are the following.
  1. Total resonance index satisfies Robbin-Salamon axioms for spectral flow.
  2. Direct proof of equality "total resonance index = intersection number".
  3. Direct proof of equality "total resonance index = total Fredholm index".
  4. (a) Criteria for a perturbation~$V$ to be tangent to the~resonance set at
a point~$H,$ where the resonance set is the infinite-dimensional variety of
self-adjoint perturbations of the initial self-adjoint operator~$H_0$ which
have~$\lambda$ as an eigenvalue. (b) Criteria for the order of tangency of a
perturbation~$V$ to the resonance set.
  5. Investigation of the root space of the compact operator
$(H_0+sV-\lambda)^{-1}V$ corresponding to an eigenvalue $(s-r_\lambda)^{-1},$
where $H_0+r_\lambda V$ is a point of the resonance set.
  This analysis gives a finer information about behaviour of discrete spectrum
compared to spectral flow.
  Finally, many results of this paper are non-trivial even in finite
dimensions, in which case they can be and were tested in numerical experiments.
