Germany says to keep up to 850 soldiers in Afghanistan