Ok, I will explain if you can tell me what to do :). So, what happened is one night I was woke up by a car alarm. I didn't know if it was our car. Later that night I was outside and heard a car alarm, so I ran to the car to see if it was ours. It was. What I ended up doing is crawling under the car and unplugging the the two horns. The car doesn't alarm now. However, the lights still blink. I am wondering if, and how many times the alarm goes off each night. I got in the car and set off the alarm and counted how many tiled the lights blink. What I'm trying to do is use a photoresistor (A0) to count how many times the lights blink. Then, if they blink 236 times, turn an LED on (pin 2) and reset the int "count". Thank you for any suggestions that you may have!!!
Start off with some basic examples until you get a hang of the syntax of for loop, selection statements (ifs) and assignment statements. Only until you understand the basics of the language can you actually start to write the logic out for your code.
When you are ready to get the logic started, take a look at the StateChangeExample because simply reading whether the photosensor is above a certain threshold isn't enough; you need to determine when the photosensor [u]crosses[/u] that threshold. That's what the StateChangeDetection example demonstrates, albeit with a digital sensor rather than an analog. The concept of keeping track of the last sensor reading, however, is the same.
Also, start small. Don't try to get everything working at once. Get a small bit of code working and use Serial prints and the Arduino Serial monitor to ensure that it's working. Build from those small bits of code, little by little.