The Guillemin-Uribe trace formula is a semiclassical version of the Selberg trace formula and the more general Duistermaat-Guillemin formula for elliptic operators on compact manifolds, which reflects the dynamics of magnetic geodesic flows in terms of eigenvalues of a natural differential operator (the magnetic Laplacian) associated with the magnetic field. In the present paper, we give a survey of basic notions and results related with the Guillemin-Uribe trace formula and provide concrete examples of its computation for two-dimensional constant curvature surfaces with constant magnetic fields and for the Katok example.