Added an assretion to ensure the number of records