If the sample has N molecules/cm3, the number of molecules present in the infinitesimal block would be
= N × S × dz
If each molecule has a cross-sectional area σ, where photons of light get absorbed, then the fraction of the total area where light gets absorbed due to each molecule would be (fractional area for each molecule)
= σ / S.