It's 8 lights in hardware for the fixed function pipeline. And that is 8 lights per render pass, not necessarily per scene/model. With fixed function rendering it can multi-pass to get more than 8 lights. The code limited the number of extra passes for performance reasons. However, with the addition of shader support the code for extra passes was removed in the fixed function pipeline, so it currently only supports 8 lights per model.
Due to the lack of an up-to-date renderer, shaders only render using a single pass, which means it is limited by the code to 8 lights per model. Attempts to multi-pass render with shaders incurred an 80-90 percent performance hit, so that capability never added beyond test builds. If the renderer is ever rewritten to allow for the performance upgrades needed to multi-pass with shaders then the light thing wont be an issue since the shaders can be written to just support 1 or 2 lights and then it can multi-pass the rest that it needs. This would allow for less complex shaders as well, since simply removing support for even one light in the current shaders can give as much as a 10-15 FPS performance boost.
And GLSL doesn't actually have an 8 light limit itself, that is merely a hold-over from the fixed-function pipeline support. All of that stuff was removed in GLSL version 1.30 (OpenGL 3.0) and now you are forced to use lights the "proper" way with shaders (with vertex attributes) which basically allows for as many lights as you want (or can get away with I guess I should say) in a single pass.
Oh, and the lights that it uses are the first 8 on a sorted list. The sorting order is:
- directional (suns)
- tube (beam weapons)
- point (explosions, lasers, etc.)
And point lights are further sorted by the size and intensity of the light so that the largest and brightest lights will come first.