J. Scott Applewhite / AP Gen. Keith B. Alexander, director of the National Security Agency and head of the U.S. Cyber Command, arrives on Capitol Hill in Washington, on June 12, to testify before the Senate Appropriations Committee. Alexander made his first public appearance since revelations that the electronic surveillance agency is sweeping up Americans' phone and Internet records in its quest to investigate terrorist threats.

The expansive government surveillance programs made public last week have helped prevent "dozens" of terrorist attacks, National Security Agency Director Keith Alexander told a Senate committee Wednesday.

It is unclear, however, what specific surveillance practices helped thwart the alleged plots.

And Alexander, an Army general, was quick to clarify that in most cases multiple programs have successfully been used together to stop attacks both in the United States and abroad.

As Edward Snowden appealed to Hong Kong through its English language newspaper, half a world away the National Security Agency strongly defended its surveillance programs. NBC's Andrea Mitchell reports.

"When I say 'dozens,' what I'm talking about here is that these authorities complement each other in helping us identify different terrorist actions and help disrupt them," Alexander said. "They complement each other."

The NSA hopes to publicly release the exact number of foiled attack within the next week, he said.

Alexander's comments came during a previously scheduled cybersecurity hearing, but marked his first appearance before lawmakers since media reports that unveiled sweeping NSA surveillance of electronic communications that has sparked a debate over the balance between personal liberties and national security.

At the heart of the controversy are two intelligence collection programs that were brought to light in recent days, one revealing that the government has been collecting phone records and another, called PRISM, that gathers large amounts of data from Internet content of users primarily outside the United States.

In an effort to rebuke critics and show the necessity of such programs, the Obama administration made public on Tuesday new details that credited the PRISM Internet spying program with successfully preventing Najibullah Zazi's 2009 plot to bomb New York City subways.

Alexander told lawmakers Wednesday that the wide ranging government monitoring "developed the lead" on the potential attack and ultimately "allowed us to know it was happening."

Also in his testimony, the NSA chief cited data mining as the tool that helped nab Pakistani-American David Headley, who scouted locations ahead of a 2008 attack in Mumbai, India that killed 160 people. Director of National Intelligence James Clapper told NBC News last week that these intelligence gathering techniques prevented Headley from carrying out a similar attack planned on a Danish newspaper.

The controversial programs have made strange bedfellows in Washington, with Democratic Sen. Dianne Feinstein of California and Michigan Republican Rep. Mike Rogers defending the program and citing the cases of Zazi and Headley as proof the government oversight is necessary. In past days, both have reiterated Alexander's claim that multiple terror plots have been prevented.

But Alexander's appearance on Capitol Hill was also an opportunity for some senators to express the outrage that many in the public feel about the top secret programs being hidden from the public eye. Tensions have risen in recent days between lawmakers who say they did not know the extent of the surveillance programs and intelligence officials and the Obama administration who contest every member of Congress had the opportunity to be fully briefed.

"The intelligence community has told us that really we obviously don't have the ability as simple senators to know anything as well as you do and so they do not need changes," Sen. Patrick Leahy, D-Vt., quipped in his opening statement.

Though committee chair Sen. Barbara Mikulski, D-Md., urged members to refrain from questions about the phone record and Internet data collection efforts, saying there would be future opportunities for that, it took little time for lawmakers to ask about the news that has dominated recent headlines.

Sen. Susan Collins, R-Maine., asked Alexander about the bold claim self-professed NSA leaker Edward Snowden made in an interview that he could instantaneously tap into any American's private phone or email records, even the President of the United States.

"I know of no way to do that," said Alexander.

In addition to his public testimony, the NSA director also delivered a classified briefing to the Senate Intelligence Committee on Tuesday and is scheduled to hold a classified meeting with all senators on Thursday.

Aware of the criticisms recently leveled against his agency, Alexander used his opening statement to defend his employees:

"They do this lawfully," he said. "They take compliance oversight, protecting civil liberties and privacy and the security of this nation to their heart every day. I could not be more proud of the men and women of NSA and Cyber Command."