Water molecules are two tiny hydrogens glued the outer electron shell of a big fat oxygen. Nitrogen, oxygen, & carbon dioxide are roughly 2x the size, and won't pass freely through many materials that water-vapor can. Liquid water has surface tension forces on it that keep it from moving through many materials that both air and water vapor can. "Vapor retarder" and "vapor barrier" are strictly about the ease of water vapor diffusion, not air or liquid water rejection.
The "perm" value describes the rate at which moisture will cross a given amount of surface area at a given difference in vapor-pressure, not to be confused with air-pressure.
Materials that are vapor retarders aren't necessarily air-barriers or conversely. A ripped sheet of foil is a lousy air-barrier, since air pressure differences can move air through it. But it's still a very powerful vapor retarder/barrier since without the movement of air, large differences in humidity can exist on either side of the boundary without moving much, if any moisture.
Spray foams are somewhat permeable, but the permeance goes down with increased thickness, and with increased density. Most half-pound open cell foam is still 10+ perms at 6" thickness, but most 2lb foam is about 1.2-perms at 1" thickness, and about 0.6 perms at 2".
The idea behind using vapor retardent materials in air-tight building structures it to limit the rate at which seasonal moisture accumulates in susceptible wood, while still allowing the structure to purge moisture during other seasons. The classic cold-weather scenario is limiting wintertime moisture from the interior accumulating in sheathing and studs. This happens wherever the average temp of the wood is below the dew point of the interior air. (In practical terms that's a dew point of 38-40F, for 68-70F, 30-35% RH conditioned space air.) The amount of vapor retarder required depends a lot on just how many hours the sheathing stays below 40F over a handful of winter weeks, and how much drying capacity there is to the exterior. If you put sufficient exterior foam sheathing to add R-value, the sheathing stays warmer, for fewer condensing hours, and you can raise the interior perm rating dramatically without fear. Similarly, if there is a vented "rainscreen" gap between the siding and the sheathing, the drying capacity toward the exterior is much enhanced, and the interior perm rating can be raised.
A decent short-hand explanation of the IRC exceptions for interior vapor barriers (and some definitions) can be found here:
http://www.buildingscience.com/docu...quirements