Is there a way to check how many lights are affecting an object?

I’m doing some optimization and I just want to check how many lights are affecting an object. In the profiler or whatever is easiest really. I just want to make sure that there aren’t any sneaky lights illuminating things without me noticing.

If you’re using a render pipeline you can use the Rendering Debugger, where you’ve switched the Material Override to Lighting Complexity.