  The classical Castelnuovo numbers count linear series of minimal degree and
fixed dimension on a general curve, in the case when this number is finite. For
pencils, that is, linear series of dimension one, the Castelnuovo numbers
specialize to the better known Catalan numbers. Using the Fulton-Pragacz
determinantal formula for flag bundles and combinatorial manipulations, we
obtain a compact formula for the number of linear series on a general curve
having prescribed ramification at an arbitrary point, in the case when the
expected number of such linear series is finite. The formula is then used to
solve some enumerative problems on moduli spaces of curves.
