We introduce a random-matrix description of full counting statistics of charge transfer through a quantum mesoscopic system at finite temperature in the presence two nonideal contacts. Using the exact map between random-matrix theory and the supersymmetric nonlinear $\ensuremath{\sigma}$ model, we demonstrate, via explicit calculations, that the saddle-point equation, derived by applying the variational principle to the supersymmetric action, can be cast in the form of the two-terminal version of Nazarov's circuit theory, thus giving it the status of a controlled approximation. For the case in which the mesoscopic system is a quantum dot at zero temperature, this circuit theory has recently been shown [A. L. R. Barbosa and A. M. S. Mac\^edo, Phys. Rev. B 71, 235307 (2005)] to reproduce exactly the asymptotic semiclassical limit of the Poisson kernel in perfect agreement with a diagrammatic approach for averaging over the unitary group. We report applications of our formalism to the description of charge transfer through a quantum dot, a quantum chain, and a quantum wire. We also discuss the role of different symmetry classes (orthogonal, unitary, and symplectic) and show how to use known exact connections between the supersymmetric nonlinear $\ensuremath{\sigma}$ model and random scattering matrix theories to perform both perturbative and nonperturbative calculations. We believe that our results will help unify the various approaches being currently used in mesoscopic physics of hybrid devices within a single physically sound and mathematically rigorous theoretical scheme.