Instruct: How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?
Output: SELECT COUNT First elected FROM table WHERE Result = Re-elected AND Party = Anti-Masonic AND District = Pennsylvania 24