adds recurse to numStableSets()