Measure nightsky with TSL237

If you count pulses for 1800 or even 180 seconds and something bright doesn't intrude, you can get less error than if count 1 or 3 seconds. Can get... because there's always a way to can't anything.

If you count pulses and see that a certain time has elapsed then you will be off by the fraction of the last pulse that didn't make it unless you exactly end the time period on a pulse start. So there you have the fraction error but that is divided by the number of pulses when you determine the average length of just 1 pulse (the inverse of frequency) so the more pulses, the better.

To do that, have an interrupt increment the pulse count and in loop() set up a timer the way it's done in BlinkWithoutDelay and when the interval is reached, copy pulse count and use that with the time interval you set up, do the math and you can have frequency. The longer the interval, the closer to precise you can be as long as something doesn't intrude on the patch of sky you're watching.

OTOH you can set up an interrupt to count some number of pulses and see how long that took, maybe completely in the IRQ. Then your loop() code just watches for the IRQ to update the how-long-it-took variable and report that. You will have pulses and time.

Why not a library?
You keep wondering what library to use. You keep wondering if the library you use is the problem. That's because you don't know what they do and it is a problem trying to troubleshoot with such an unknown.

In this case what the library does is not difficult and you will doubtless benefit from learning. Just take your time, identify what it is your don't know and learn those pieces as you put it together.