What did Jefferson do because he was concerned with the number of Federalists working in the government?
He tried to scuttle some signed-but-not-delivered Adams appointments, resulting in Marbury v. Madison.
On his way out of office, John Adams (the first and last Federalist president) signed appointments for 58 judges (16 circuit judges and 42 justices of the peace), all Federalists. He did not have time to deliver the appointments.
Thomas Jefferson, from the opposing Democratic Republican Party, discarded the appointments and made some of his own. One of the Adams appointees, William Marbury, sued James Madison, the Jefferson-appointed Secretary of State, for not delivering his five-year appointment as a judge in the District of Columbia.
After two years of lawsuits, the Supreme Court took up the case. their decision was murky: They agreed that Marbury had a right to the appointment, but that Madison had an equally compelling right not to deliver the appointment letters. They also used this case to establish the Supreme Court as the final arbiter in the constitutionality of new laws, a power not explicitly mentioned in the constitution.
On paper, Marbury won. In practical terms, Madison won. Ultimately, the Supreme Court succeeded in a naked power grab and was the biggest winner.