  We describe an algorithm to compute the number of points over finite fields
on a broad class of modular curves: we consider quotients $X_H/W$ for $H$ a
subgroup of $\GL_2(\mathbb Z/n\mathbb Z)$ such that for each prime $p$ dividing
$n$, the subgroup $H$ at $p$ is either a Borel subroup, a Cartan subgroup, or
the normalizer of a Cartan subgroup of $\GL_2(\mathbb Z/p^e\mathbb Z)$, and for
$W$ any subgroup of the Atkin-Lehner involutions of $X_H$. We applied our
algorithm to more than ten thousands curves of genus up to 50, finding more
than one hundred record-breaking curves, namely curves $X/\FF_q$ with genus $g$
that improve the previously known lower bound for the maximum number of points
over $\FF_q$ of a curve with genus $g$. As a key technical tool for our
computations, we prove the generalization of Chen's isogeny to all the Cartan
modular curves of composite level.
