We examine the salt dependence of the B-Z transition in DNA by means of the counterion condensation theory adapted to structurally realistic coordinates of the phosphate groups. The ionic contribution to the free energy difference DELTA-G is computed for both the Z(I) and Z(II) conformations over broad ranges of NaCl and MgCl2 concentrations and polymer lengths. For the solvent we employ both a constant-dielectric model (dielectric constant set to 78.3) and a dielectric saturation model (distance-dependent dielectric constant). Where comparison can be made, the results for the constant-dielectric model are similar to those obtained by other workers for the same model but with different computational methods. The existence of a low-salt transition, and its location when it does occur, depends strongly on the DNA length and on the dielectric model. The behavior of Z(I) and Z(II) are qualitatively similar throughout the entire salt range for the constant-dielectric model, but qualitatively different if dielectric saturation is simulated, as we think is necessary for a realistic description. The ionic DELTA-G, in the presence of dielectric saturation, bears comparison with the high-salt trend of the measured total DELTA-G if "Z-DNA" is predominantly Z(I), but not if it is predominantly Z(II).