1. A people counting device comprising: an image input unit which inputs an image; a person extraction unit which extracts a person from the image input into the image input unit; a motion path creation unit which creates a motion path of the person from positional information in the image of the person extracted by the person extraction unit; a people number counting unit which counts a number of people based on a positional relation between the motion path of the person created by the motion path creation unit and a measurement reference coordinate set within the image; an attribute extraction unit which obtains an attribute of the person extracted by the person extraction unit; and a measurement reference coordinate setting unit which sets the measurement reference coordinate for the motion path corresponding to the person according to the attribute of the person extracted by the attribute extraction unit.