1. An automatic counting apparatus for automatically measuring the number of target objects included in an image, comprising: a discrimination means for discriminating the target objects included in the image based on face information extracted from the image; a counting means for measuring the number of target objects discriminated by the discrimination means; and a correction means for correcting the number of each type of target object measured by the counting means such that the counting error arising from the difference in the discrimination accuracy between each type of target object is minimized based on information related to the discrimination accuracy for each type of target object, wherein the information related to the discrimination accuracy is information that indicates a discrimination rate for each type of target object; and the correction means performs correction in which the number of each type of target object measured by the counting means is replaced by a value which is obtained by dividing the number of each type of target object measured by the counting means by the discrimination rate for the corresponding target object.