Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE type_of_restaurant ( resid number, restypeid number )
TABLE: CREATE TABLE restaurant ( resid number, resname text, address text, rating number )
TABLE: CREATE TABLE restaurant_type ( restypeid number, restypename text, restypedescription text )
TABLE: CREATE TABLE visits_restaurant ( stuid number, resid number, time time, spent number )
TABLE: CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text )

### Question ###
How many times has the student Linda Smith visited Subway?

### Accurate SQL ###

SELECT COUNT(*) FROM student JOIN visits_restaurant ON student.stuid = visits_restaurant.stuid JOIN restaurant ON visits_restaurant.resid = restaurant.resid WHERE student.fname = "Linda" AND student.lname = "Smith" AND restaurant.resname = "Subway"