Complex analysis is also often used in analytic number theory as a tool to evaluate or estimate sums $\sum a_n $ by studying the analytic behaviour (like existence of poles or how fast it grows) of the associated Dirichlet series $\sum a_n n^{-s}$. So for most interesting arithmetical functions (like a_n = number of divisors of n, say), one can study the corresponding Dirichlet series (possibly factor it as a product of various $L$-functions) to obtain information about the sum.
Another important way it is used One uses the Perron formula or Mellin inversion formula to pass from the sum to a contour integral. Davenport's book is via the theory of modular formscanonical reference.