Each ticket to a school dance is $4. The total amount collected in ticket sales is $332. Write and solve an equation to find the number of students attending the dance.