This paper describes a simple and effective system for counting the number of objects that move through a region of interest. In this work, I focus on the problem of counting the number of people that are entering or leaving an event. I design a pedestrian counting system that uses a dense optical flow field to calculate the integral of the optical flow in a video sequence. The only parameter used in the system is the the estimated integral flow for a single person. This parameter can be easily calculated from a short training sequence. Empirical evaluations show that the system is able to provide accurate estimates even for complex sequences in real-time. The described system won 2nd place in the pedestrian counting computer vision competition at the IEA-AIE 2014 conference.