If you've ever need to count people as they pass through an area, either indoors or out - then the following project by Peter Vojtek will be of interest. Peter has used an ultrasonic distance measuring sensor to detect an object in its presence and simply add values to a counter in the Arduino.
The accuracy of the device will be determined by the quality of the sensor and mounting it so people must walk past it within the range, however with some planning this shouldn't be a problem. The data could be logged to an SD card, the Arduino's EEPROM or perhaps via wireless to another device. With Peter's example an LED is activated every time a person is detected, for example:
If you're looking to learn how to use ultrasonic distance sensors and much more with Arduino, you can't go past "Arduino Workshop - A Hands-On Introduction with 65 Projects” by John Boxall.
Arduino Workshop takes the reader from having zero knowledge about the Arduino platform, electronics and programming and leaves them with the know-how and instructions on everything from blinking an LED, to robotics, wireless data, cellular communications, motor control, sensors, Internet connected systems and more. For more information including a sample chapter and table of contents, visit the book page.