  We use the Riemann-Hilbert approach, together with string and Toda equations,
to study the topological expansion in the quartic random matrix model. The
coefficients of the topological expansion are generating functions for the
numbers $\mathscr{N}_j(g)$ of $4$-valent connected graphs with $j$ vertices on
a compact Riemann surface of genus $g$. We explicitly evaluate these numbers
for Riemann surfaces of genus $0,1,2,$ and $3$. Also, for a Riemann surface of
an arbitrary genus $g$, we also calculate the leading term in the asymptotics
of $\mathscr{N}_j(g)$ as the number of vertices tends to infinity. Using the
theory of quadratic differentials, we characterize the critical contours in the
complex parameter plane where phase transitions in the quartic model take
place, thereby proving a result of David \cite{DAVID}. These phase transitions
are of the following four types: a) one-cut to two-cut through the splitting of
the cut at the origin, b) two-cut to three-cut through the birth of a new cut
at the origin, c) one-cut to three-cut through the splitting of the cut at two
symmetric points, and d) one-cut to three-cut through the birth of two
symmetric cuts.
