A device for counting, inspecting, sorting, and stacking planar food products such as tortillas. The tortillas are sandwiched between a pair of conveyor belts moving at the same speed to a discharge location between a pair of rollers around which the respective conveyor belts extend. The speed of the tortillas causes them to be flung from between the rollers onto a discharge tray. A counter determines when a predetermined number of tortillas have been discharged onto the discharge tray. The counter then triggers an actuator to remove the tray from beneath the stack of tortillas, thereby allowing them to fall onto a discharge conveyor belt. The discharge conveyor belt is then moved an incremental distance. The tortillas passing through the device are scanned in order to detect defective tortillas. When a defective tortilla is found, one of the rollers at the discharge location is shifted, thereby altering the path of the tortillas flung from the conveyor belts at the discharge location onto a reject discharge conveyor belt.