How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?
CREATE TABLE "pennsylvania" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
SELECT COUNT("first_elected") FROM "pennsylvania" WHERE "result"='Re-elected' AND "party"='Anti-Masonic' AND "district"='Pennsylvania 24';