Pills in a dose packet having strings and/or drawing patterns printed or handwritten thereon are counted at high accuracy. A pill counting device counts pills in a dose packet including two near-infrared light transmissive sheets laminated and sealed at the periphery, a first sheet of the sheets having information identifiers thereon. The device includes an illuminator to emit near-infrared light toward the packet from below, while the first sheet faces downward; an imager disposed to receive the near-infrared light transmitted through the packet and take a digital image of the packet; a light quantity adjuster to adjust the quantity of the near-infrared light received by the imager; and a pill counter to binarize the image and count the pills. For a digital image of the packet containing no pill, the light quantity adjuster adjusts the quantity such that the gray scale values of substantially all the pixels exceed a threshold.