An Iranian official confirmed that about 2,000 people had been killed in the protests, the first time authorities have given an overall death toll.