The term optical density is used with two different meanings:
Optical density may mean the absolute value of the logarithm with base 10 of the power transmission factor of an optical attenuator:
If several attenuators are used in series, their optical densities can simply be added.
To avoid ambiguity, it is better to use the term absorbance.
Optical Density and Refractive Index
A transparent medium is sometimes said to have a high optical density (or to be relatively dense) if it has a high refractive index. For example, one may say that total internal reflection is possible only if the beam comes from the optically more dense medium. This use of the term has nothing to do with attenuation.