Among the legislators who will end in 2009, how many are from the Republican party?
the legislators who will end in 2009 refers to END 2009; from the Republican party refers to party = 'Republican'
SELECT `END`, party FROM `current-terms` WHERE STRFTIME('%Y', `END`) = '2009' AND party = 'Republican'