A graph with 7 vertices has degrees 2, 2, 4, 7, 7, 7, and 9. How many edges does it have?