The invention relates to a counting method based on pedestrian head and shoulder multi-target detecting and tracking. The method comprises the steps that a positive sample data set and a negative sample data set of a pedestrian head and shoulder image are constructed, HOG feature vectors of the data sets are extracted, moving foregrounds are extracted through a Gaussian mixture model, the minimum envelope rectangle of the foregrounds is taken as a detection region, pedestrian head and shoulder targets are detected through a multi-scale slide window and a trained SVM classifier, a target matching matrix is initialized into a zero matrix, a pedestrian counter is initialized, the number of the target people passing through the area is counted, and for a target in a tracking list TraList, if the center position of the target is located out of a tracking area, the target is deleted, and the pedestrian counter is updated. According to the method, the pedestrian volume in the specific area is counted through a computer vision technology, the method is used for pedestrian counting, the problems that traditional pedestrian counting is low in efficiency and accurate rate are solved, the digital and intelligent level of pedestrian counting is increased, and the method is a multi-win project capable of bringing the economic benefit and social security and is suitable for multiple indoor and outdoor scenes.