We describe a low-cost, 486-based, real-time imaging system to count people in a reasonably restricted traffic flow such as in the entryway of a building. A window of the original image, subdivided into gates, was processed to highlight the people moving through the gates. The gates were then further processed to eliminate noise, determine motion direction, and find and count the people. When the system was tested on 7491 people in heavy traffic, the accuracy was 95.6 percent.