The attack comes at an uneasy time in Afghanistan as the country recounts votes from a disputed presidential election which the Taliban have vowed to disrupt.