  We use $N$-body simulations to measure mass functions in flat cosmological
models with quintessence characterized by constant $w$ with $w=-1$, -2/3 and
-1/2. The results are compared to the predictions of the formula proposed by
Jenkins et al. at different redshifts, in terms of FOF masses as well as Abell
masses appropriate for direct comparison to observations. The formula
reproduces quite well the mass functions of simulated haloes in models with
quintessence. We use the cluster mass function data at a number of redshifts
from Carlberg et al. to constrain $\Omega_0$, $\sigma_8$ and $w$. The best fit
is obtained in the limit $w \to 0$, but none of the values of $w$ in the
considered range $-1 \le w < 0$ can actually be excluded. However, the adopted
value of $w$ affects significantly the constraints in the $\Omega_0-\sigma_8$
plane. Taking into account the dependence on $w$ we find $\Omega_0=0.32 \pm
0.15$ and $\sigma_8=0.85_{-0.12}^{+0.38}$ (68% c.l.). Since less negative $w$
push the confidence regions toward higher $\Omega_0$ and lower $\sigma_8$ we
conclude that relaxing the assumption of $w=-1$ typically made in such
comparisons may resolve the discrepancy between recent cluster mass function
results (yielding rather low $\Omega_0$ and high $\sigma_8$) and most other
estimates. The fact that high $w$ values are preferred may however also point
towards some unknown systematics in the data or the model with constant $w$
being inadequate.
