user: ### NOW ANSWER:
Question: how many times was the incumbent is John B. Yates?
Columns: ['District', 'Incumbent', 'Party', 'First elected', 'Result', 'Candidates']
Types: ['text', 'text', 'text', 'text', 'text', 'text']
Sample row: ['New York 3', 'Jonathan Ward', 'Democratic-Republican', '1814', 'Retired Democratic-Republican hold', 'Caleb Tompkins (DR) 56.8% Abraham Odell (F) 42.8%']
SQL:

assistant: SELECT COUNT("Party") FROM "Table" WHERE "Incumbent" = 'John B. Yates';