Attendance is calculated on ????

Just curious. Is the announced attendance the number of tickets sold for the game or is it essstially the turnstile count as they scan our tickets coming in ???