Pirogov-Sinai theory was developed to understand discrete statistical mechanics models at low temperatures. In recent joint work with W. Perkins and G. Regts we have shown that Pirogov-Sinai theory is also useful for the development of efficient deterministic counting algorithms. I will introduce the basic ideas of the theory and the key notion of a contour model, a more sophisticated version of an abstract polymer model. Efficient algorithms can then be obtained by combining contour models with the cluster expansion tools introduced in the talk of W. Perkins. As applications of these ideas I will present efficient approximate counting algorithms for the Potts and hard-core models on Z^d at low temperatures and high densities, respectively.