prepare_batch: tweak record count check