retail store visitors counter
This answer probably isn't as complete / simple as you'd hoped for, but the best option that comes to my mind is to use a USB webcam. I've used a Microsoft LifeCam with a Raspberry Pi but there's a full list of supported cameras at RPi USB Webcams.

The RPi can run the OpenCV Open Source Computer Vision Library but I've never used it myself and you'll need to put some effort into developing the algorithm to detect people as they walk in. As far as image processing goes conceptually it might not be too complex and there are quite a few examples and places you can ask questions about it.

I guess the other thing to consider depending on the nature of your store is whether two people entering side by side are really two customers or just one partner dragging along another. In the latter case maybe using a simple infrared beam would suffice.