We derive characteristic functions to determine the number and stability of relaxation oscillations for a class of planar systems. Applying our criterion, we give conditions under which the chemostat predator-prey system has a globally orbitally asymptotically stable limit cycle. Also we demonstrate that a prescribed number of relaxation oscillations can be constructed by varying the perturbation for an epidemic model studied by Li et al.