Counting the number of modular inverses with respect to a fixed modulus in a given interval is quite an elementary but a long-standing open problem in number theory. In the lecture, I will introduce a dynamical approach to study an average version of the problem. The dynamical argument involves analysis on a transfer operator associated with the Gauss dynamical system.