Teacher numbers have fallen to their lowest point in the last four years.
Education Secretary Michael Russell said the total of 51,286 teachers for 2011 is still better than the target of 51,131, agreed with local government and unions.
The figures showed a reduction from the high of 55,100 in 2007 when the SNP took office, to 51,441, if grant-aided positions are included.
The Scottish Government figures also showed two-thirds of new teachers were in work after their probation year, up from 58% last year.
Average primary class sizes remained roughly the same, rising slightly from 22.4 to 22.5, while 99% of P1 pupils were in classes of 25 or fewer, compared with 87% in 2010.
The number of exclusions from local authority schools dropped by 11% from 30,211 to 26,844.
Education Secretary Michael Russell said: "Today's figures show that in line with our agreement with our partners in teaching unions and local government, they have delivered our commitment to maintain teacher numbers. The statistics report that teacher numbers in local authority schools stand at 51,286, in excess of the target of 51,131.
"The average class size for primary-one is down from 21.1 in 2010 to 20.5 in 2011 - a new record low. The number of P1 pupils in classes of more than 25 is down from 6,896 to 638 in 2011, a total reduction of 90% since the legislation was introduced.
"The information also shows that attainment has improved, more children are leaving school for positive destinations and that exclusions are down. In addition, key investments in school buildings have resulted in more children attending better quality schools.
"From today's information the outlook for Scotland's schools is good. But I must stress that we are not complacent. In the face of Westminster cuts we will continue to work hard to deliver further improvement."
Ronnie Smith, general secretary of teachers' union Educational Institute of Scotland, said a jobs guarantee target was struck in a tough financial climate.
He added: "This was a very difficult deal to negotiate, and it did involve willingness to compromise by Scotland's teachers in the light of the budget-cutting agenda. But it is clear that the decision taken by the EIS to focus on protecting teaching jobs and enhancing job prospects for new teachers was the correct one.
"As a result of this agreement, thousands of newly and recently qualified teachers who would otherwise have faced job uncertainty are in stable employment as teachers throughout Scotland."
But Labour education spokesman Ken Macintosh MSP said a "quiet crisis" is brewing in classrooms.
He added: "Despite their promises, the SNP has allowed teacher numbers to fall every year since they took office. Even on pupil-teacher ratios, as opposed to class sizes, the SNP Government is doing exactly the opposite of what they said they would do.
"I worry not just for our teachers but for our children who are the real losers here.
"We must aspire to have a world-leading education system again because the tragedy is that behind each of these statistics is a pupil not getting the time, attention and quality of education they deserve."
Scottish Conservative education spokeswoman Liz Smith MSP said the figures are embarrassing for the SNP.
"They promised smaller class sizes, lower pupil to teacher ratios and that they would maintain teacher numbers across the board," she said.
"Almost everything is going in the opposite direction to what they pledged. Parents in every corner of Scotland, especially those who believed the SNP manifesto in May and voted for them, have every reason to feel let down and angry."