  In this paper, the second of a series, we study the stellar dynamical and
evolutionary processes leading to the formation of compact binaries containing
neutron stars (NSs) in dense globular clusters (GCs). For this study, 70 dense
clusters were simulated independently, with a total stellar mass ~2x10^7Msun,
exceeding the total mass of all dense GCs in our Galaxy.
  We find that, in order to reproduce the empirically derived formation rate of
low-mass X-ray binaries (LMXBs), we must assume that NSs can be formed via
electron-capture supernovae (ECS) with typical natal kicks smaller than in
core-collapse supernovae. Our results explain the observed dependence of the
number of LMXBs on ``collision number'' as well as the large scatter observed
between different GCs. We predict that the number of quiescent LMXBs in
different GCs should not have a strong metallicity dependence. In our cluster
model the following mass-gaining events create populations of MSPs that do not
match the observations: (i) accretion during a common envelope event with a NS
formed through ECS, and (ii) mass transfer (MT) from a WD donor. Some processes
lead only to a mild recycling. In addition, for MSPs, we distinguish
low-magnetic-field (long-lived) and high-magnetic-field (short-lived)
populations. With this distinction and by considering only those mass-gaining
events that appear to lead to NS recycling, we obtain good agreement of our
models with the numbers and characteristics of observed MSPs in 47 Tuc and
Terzan 5, as well as with the cumulative statistics for MSPs detected in GCs of
different dynamical properties. We find that significant production of merging
double NSs potentially detectable as short gamma-ray bursts occurs only in very
dense, most likely core-collapsed GCs. (abridged)
