  We define relative Ruan invariants that count embedded connected symplectic
submanifolds which contact a fixed stable symplectic hypersurface V in a
symplectic 4-manifold (X,w) at prescribed points with prescribed contact orders
(in addition to insertions on X\V) for stable V. We obtain invariants of the
deformation class of (X,V,w). Two large issues must be tackled to define such
invariants: (1) Curves lying in the hypersurface V and (2) genericity results
for almost complex structures constrained to make V pseudo-holomorphic (or
almost complex). Moreover, these invariants are refined to take into account
rim tori decompositions. In the latter part of the paper, we extend the
definition to disconnected submanifolds and construct relative Gromov-Taubes
invariants.
