We present a new lattice QCD analysis of heavy-quark pseudoscalar-pseudoscalar correlators, using gluon configurations from the MILC collaboration that include vacuum polarization from $u$, $d$, $s$ and $c$~quarks($n_f=4$). We extract new values for the QCD coupling and for the $c$ quarks $overline{mathrm{MS}}$ mass: $alpha_{overline{mathrm{MS}}}(M_Z,n_f=5) = 0.11822(74)$ and $m_c(3mathrm{GeV}, n_f=4) = 0.9851(63)$GeV. These agree well with our earlier simulations using $n_f=3$ sea quarks, vindicating the perturbative treatment of $c$ quarks in that analysis. We also obtain a new nonperturbative result for the ratio of $c$~and $s$~quark masses: $m_c/m_s=11.652(65)$. This ratio implies $m_s(2,mathrm{GeV}, n_f=3)=93.6(8)$MeV when it is combined with our new~$c$~mass. Combining $m_c/m_s$ with our earlier $m_b/m_c$ gives $m_b/m_s=52.55(55)$, which is several standard deviations (but only 4%) away from the Georgi-Jarlskop prediction from certain GUTs. Finally we obtain an $n_f=4$ estimate for $m_b/m_c=4.528(54)$ which agrees well with our earlier $n_f=3$ result. The new ratio implies~$m_b(m_b,n_f=5)=4.162(48)$GeV.