  Bounding the number of rational points of height at most $H$ on irreducible
algebraic plane curves of degree $d$ has been an intense topic of investigation
since the work by Bombieri and Pila. In this paper we establish optimal
dependence on $d$, by showing the upper bound $C d^2 H^{2/d} (\log H)^\kappa$
with some absolute constants $C$ and $\kappa$. This bound is optimal with
respect to both $d$ and $H$, except for the constants $C$ and $\kappa$. This
answers a question raised by Salberger, leading to a simplified proof of his
results on the uniform dimension growth conjectures of Heath-Brown and Serre,
and where at the same time we replace the $H^\epsilon$ factor by a power of
$\log H$. The main strength of our approach comes from the combination of a
new, efficient form of smooth parametrizations of algebraic curves with a
century-old criterion of P\'olya, which allows us to save one extra power of
$d$ compared with the standard approach using B\'ezout's theorem.
