In OpenGL, texture unit may mean different things ;
- a texture coordinates generator/interpolator unit (which provides texture coordinates), queried with GL_MAX_TEXTURE_COORDS,
- a texture image unit (which provides texture data), queried with GL_MAX_TEXTURE_IMAGE_UNITS,
- a full texture unit for fixed function pipeline, composed of a texture coordinates generator/interpolator + a texture image unit, queried with GL_MAX_TEXTURE_UNITS,
Depending on your needs, just performs the according query.
For example on a GeForce 5200FX, you get 4 full units, but there are 16 image units.
As far as I know, you need to use shaders to access the full set of texture image units, they are not exposed through the fixed function pipeline.