Carter is in Afghanistan to meet with US commanders in the wake of a pledge by NATO allies to keep troop levels stable as they battle a resilient Taliban.
Speaking during a press conference with Afghan President Ashraf Ghani, Carter also said that progress by the Afghanistan government on economic and anti-corruption reforms "is central" to the continued international support for the country.
Ghani said his government is working to remove corruption and also on the economic reforms.
Carter was scheduled to meet with both Ghani and chief executive officer Abdullah Abdullah, as well as his top US commander in Afghanistan, Army Gen. John W. Nicholson.
More From This Section
Nicholson told reporters that he will have 3,000 US troops working as advisers in Afghanistan, 2,150 troops doing counterterrorism and 3,000 working in a supporting role as enablers.
In addition, he said he will keep "some hundreds" of forces "over the horizon" out of the country that will be considered part of the NATO advise and assist mission.
Obama announced last week that he would keep 8,400 US troops in Afghanistan after this year, rather than cut their numbers to 5,500 as he once planned.
In addition to taking part in the NATO advisory-and-assist mission, the US has special operations forces in the country that conduct counterterrorism missions.
The planned force levels allow NATO allies to remain in regional hubs around Afghanistan, with Germany in the north, Italy in the west, Turkey in the capital of Kabul and the United States in the east and south.