Task: Text to Code
Input (English): SQL: SELECT Count ( * ) FROM Type_Of_Restaurant WHERE ResTypeID = "Sandwich"
Feedback: Replace type of restaurant table and restaurant type id with restaurant and restaurant type name respectively .
Output (English): SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID =  Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'