Combing to sketches

I have both sketches running at the same time on the same ATmega328

That is not possible. Only one sketch at a time can be running on an Arduino.

I just haven't been successful at making the LDR sketch do the counting.

Where is your attempt at combining the two sketches?