  We study rank-one sheaves and stable pairs on a smooth projective complex
surface. We obtain an embedding of the moduli space of limit stable pairs into
a smooth space. The embedding induces a perfect obstruction theory, which, over
a surface with irregularity 0, agrees with the usual deformation-obstruction
theory. The perfect obstruction theory defines a virtual fundamental class on
the moduli space. Using the embedding, we show that the virtual class equals
the Euler class of a vector bundle on the smooth ambient space. As an
application, we show that on $\mathbb{P}^2$, the expected count of the finite
Quot scheme in arXiv:1610.04185 is its actual length. We also obtain a
universality result for tautological integrals on the moduli space of stable
pairs.
