Database schema:

CREATE TABLE "Dish" (
	id INTEGER -- example: ['2', '1'],
	name TEXT -- example: ['Consomme printaniere royal', 'Chicken gumbo'],
	description TEXT -- example: [''],
	menus_appeared INTEGER -- example: ['8', '111'],
	times_appeared INTEGER -- example: ['8', '117'],
	first_appeared INTEGER -- example: ['1897', '1895'],
	last_appeared INTEGER -- example: ['1927', '1960'],
	lowest_price REAL -- example: ['0.2', '0.1'],
	highest_price REAL -- example: ['0.8', '0.4'],
	PRIMARY KEY (id)
)


CREATE TABLE "Menu" (
	id INTEGER -- example: ['12464', '12463'],
	name TEXT -- example: ['', 'The Modern'],
	sponsor TEXT -- example: ['HOTEL EASTMAN', 'REPUBLICAN HOUSE'],
	event TEXT -- example: ['[DINNER]', 'BREAKFAST'],
	venue TEXT -- example: ['', 'COMMERCIAL'],
	place TEXT -- example: ['HOT SPRINGS, AR', 'MILWAUKEE, [WI];'],
	physical_description TEXT -- example: ['CARD; ILLUS; COL; 7.0X9.0;', 'CARD; 4.75X7.5;'],
	occasion TEXT -- example: ['', 'EASTER;'],
	notes TEXT -- example: ['', 'WEDGEWOOD BLUE CARD; WHITE EMBOSSED GREEK KEY BORD'],
	call_number TEXT -- example: ['1900-2822', '1900-2825'],
	keywords TEXT, 
	language TEXT, 
	date DATE -- example: ['1900-04-16', '1900-04-15'],
	location TEXT -- example: ['Hotel Eastman', 'Republican House'],
	location_type TEXT, 
	currency TEXT -- example: ['Dollars', 'Cents'],
	currency_symbol TEXT -- example: ['$', 'c'],
	status TEXT -- example: ['complete'],
	page_count INTEGER -- example: ['2', '4'],
	dish_count INTEGER -- example: ['67', '34'],
	PRIMARY KEY (id)
)


CREATE TABLE "MenuItem" (
	id INTEGER -- example: ['2', '1'],
	menu_page_id INTEGER -- example: ['3079', '1389'],
	price REAL -- example: ['0.6', '0.4'],
	high_price REAL -- example: ['1.0', '3.0'],
	dish_id INTEGER -- example: ['2', '1'],
	created_at TEXT, 
	updated_at TEXT, 
	xpos REAL -- example: ['0.438571', '0.111429'],
	ypos REAL -- example: ['0.261922', '0.254735'],
	PRIMARY KEY (id), 
	CONSTRAINT fk_menuitem_dish FOREIGN KEY(dish_id) REFERENCES "Dish" (id),
	CONSTRAINT fk_menuitem_menupage FOREIGN KEY(menu_page_id) REFERENCES "MenuPage" (id)
)


CREATE TABLE "MenuPage" (
	id INTEGER -- example: ['119', '120'],
	menu_id INTEGER -- example: ['12461', '12460'],
	page_number INTEGER -- example: ['2', '1'],
	image_id REAL -- example: ['1603595.0', '1603596.0'],
	full_height INTEGER -- example: ['5428', '7230'],
	full_width INTEGER -- example: ['5428', '7230'],
	uuid TEXT -- example: ['510d47e4-2956-a3d9-e040-e00a18064a99', '510d47e4-2955-a3d9-e040-e00a18064a99'],
	PRIMARY KEY (id), 
	CONSTRAINT fk_menupage_menu FOREIGN KEY(menu_id) REFERENCES "Menu" (id)
)

Question: How many dishes do not have correct data for the year in which it appeared first?
Evidence: do not have correct data refers to first_appeared < 1851 or first_appeared > 2012;

SQL:
SELECT COUNT(*) FROM Dish WHERE first_appeared < 1851 OR first_appeared > 2012