The amount of counterions, measured by means of X-ray photoelectron spectroscopy (XPS), in layer-by-layer (LbL) films of poly(allylamine hydrochloride) (PAH) and poly(styrene sulfonate) (PSS), prepared from solutions with various NaCl concentrations, is shown to be greatly influenced by the film drying process: a smaller amount of counterions is observed in films dried after adsorption of each layer, when compared with films that were never dried during the film preparation. This is attributed to the formation of NaCl nanocrystals during the drying process which dissolve when the film is again immersed in the next polyelectrolyte solution. The presence of bonded water molecules was confirmed in wet films indicating that the counterions near the ionic groups are immersed in a water network. The number of counterions is dependent on the amount of salt in polyelectrolyte solutions in such a way that for a concentration of 0.2 M the relative amount of counterions attains saturation for both dried and wet samples, indicating that the process which leads the aggregation of counterions near of the ionic groups is not influenced by the drying process. Moreover, it is proven for wet samples that the increase in salt concentration leads to a decrease in the number of PAH ionized groups as predicted by the Muthukumar theory [J. Chem. Phys. 120 (2004) 9343] accounting for the counterion condensation on flexible polyelectrolytes. (c) 2007 Elsevier Inc. All rights reserved.