Democracy Arsenal has an outstanding table contrasting the war efforts in Afghanistan and Iraq. Among many points of comparison--number of American troops, overall cost, amount of public support--the critical one might be the two alliances.
Success in counterinsurgency depends on staying power, which in turn increases substantially when Americans aren't fighting alone. Only half the troops in Afghanistan are American soldiers. Because we went to war as part of NATO, instead of a goofy "coalition of the willing," the United States is enjoying the support of 36 countries in Afghanistan, as opposed to only 20 countries in Iraq.
The Iraq war has been a long, expensive, violent reminder that multilateralism helps more than it hurts.