CREATE TABLE table_2668199_2 (first_elected VARCHAR2, district VARCHAR2, result VARCHAR2, party VARCHAR2)

How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?
SELECT COUNT(first_elected) FROM table_2668199_2 WHERE result = "Re-elected" AND party = "Anti-Masonic" AND district = "Pennsylvania 24"
SELECT COUNT("first_elected") FROM "table_2668199_2" WHERE "Anti-Masonic" = "party" AND "Pennsylvania 24" = "district" AND "Re-elected" = "result"