Task: Text to Code
Input (English): Step 1: For each row in Lives_in table, find corresponding rows in Student table and in Dorm table.
Step 2: find the number of rows in the results of step 1 whose Sex equals Smith Hall and gender equals F
Output (English): SELECT Count ( * ) FROM Student AS T1 JOIN Dorm AS T2 JOIN Lives_in AS T3 ON T1.StuID = T3.stuid AND T3.dormid = T2.dormid WHERE T1.Sex = "Smith Hall" AND T2.gender = "F"