For how many values of $a$ is it true that the line $y = x + a$ passes through the
vertex of the parabola $y = x^2 + a^2$ ?
$\mathrm{(A)}\ 0      \qquad \mathrm{(B)}\ 1      \qquad \mathrm{(C)}\ 2      \qquad \mathrm{(D)}\ 10      \qquad \mathrm{(E)}\ \text{infinitely many}$
We see that the vertex of the quadratic function $y = x^2 + a^2$ is $(0,\,a^2)$. The y-intercept of the line $y = x + a$ is $(0,\,a)$. We want to find the values (if any) such that $a=a^2$. Solving for $a$, the only values that satisfy this are $0$ and $1$, so the answer is $\boxed{\mathrm{(C)}\ 2}$