  Planets are observed to orbit the component star(s) of stellar binary systems
on so-called circumprimary or circumsecondary orbits, as well as around the
entire binary system on so-called circumbinary orbits. Depending on the orbital
parameters of the binary system a planet will be dynamically stable if it
orbits within some critical separation of the semimajor axis in the
circumprimary case, or beyond some critical separation for the circumbinary
case. We present N-body simulations of star-forming regions that contain
populations of primordial binaries to determine the fraction of binary systems
that can host stable planets at various semimajor axes, and how this fraction
of stable systems evolves over time. Dynamical encounters in star-forming
regions can alter the orbits of some binary systems, which can induce long-term
dynamical instabilities in the planetary system and can even change the size of
the habitable zone(s) of the component stars. However, the overall fraction of
binaries that can host stable planetary systems is not greatly affected by
either the assumed binary population, or the density of the star-forming
region. Instead, the critical factor in determining how many stable planetary
systems exist in the Galaxy is the stellar binary fraction - the more stars
that are born as singles in stellar nurseries, the higher the fraction of
stable planetary systems.
