Add an option to limit the number of lines to be processed.