Add an option to limit the number of records read