How many lights OpenGL can use? Only 8???
It’s implementation dependent. The minimum requirement in the OpenGL specs and what most implementations support is 8.
You can query it at runtime with glGetIntegerv(GL_MAX_LIGHTS, &maxLights);
Some implementations support 16 or 24 lights, but it’s pretty useless.
If you need more than 8 lights, you can either take a virtual lights approach and only use the 8 lights nearest to the object you’re going to render, or use a multipass approach with blending, or put the lighting environment in a cubemap and and use texturing to put as many “lights” onto your object as you want in one pass.