### Database Schema:
CREATE TABLE location (
	id_restaurant	INTEGER	NOT NULL	PRIMARY KEY,
	street_num	INTEGER	NULL,
	street_name	TEXT	NULL,
	city	TEXT	NULL,
	foreign key (city) references geographic (city),
	foreign key (id_restaurant) references generalinfo (id_restaurant)
);

CREATE TABLE geographic (
	city	TEXT	NOT NULL	PRIMARY KEY,
	county	TEXT	NULL,
	region	TEXT	NULL
);

CREATE TABLE generalinfo (
	id_restaurant	INTEGER	NOT NULL	PRIMARY KEY,
	label	TEXT	NULL,
	food_type	TEXT	NULL,
	city	TEXT	NULL,
	review	REAL	NULL,
	foreign key (city) references geographic (city)
);

### User's Query:
In restaurants with a review of 2, how many restaurants have a street number below 500?

### Extra Knowledge:
review of 2 refers to review = 2; street number below 500 refers to street_num < 500
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500