CREATE TABLE table_name_13 (attendance VARCHAR(255), result VARCHAR(255), week VARCHAR(255))
What was the total attendance with a result of W 31-21 before week 9?
    
SQL: SELECT COUNT(attendance) FROM table_name_13 WHERE result = "w 31-21" AND week < 9