Minor fix in input counting.