TSL235R inconsistent output

Something else to try (Though it might not do anything):
Save your variables to an array, and wait to print after you are done collecting data. Printing to the serial is relatively slow and might interfere with the pulse counts.

Oh and one other question we should have asked far earlier. Have you checked your signal with an oscilloscope and made sure there was nothing strange about it?