The estimation of the pedestrians on a crosswalk is a challenging job due to the occluded pedestrians and its complicated background. Here, an efficient method to estimate approximately the number of pedestrians on a crosswalk is presented. Foregrounds are extracted from an incoming image by using the constructed background, and then elaborately processing to remove unwanted pixels. With the aid of perspective transformation, the relation between the number of remaining foreground pixels and the number of pedestrians can be linearized, thus the estimation can be done. Instead of segmenting each pedestrian in the scene, our system counts foreground pixels, so it demands low computational power. Furthermore, this system doesn't need to be trained. The experimental results show that it works well in different scenes.