The number of people killed when a bomb went off at an election rally in northeastern Afghanistan has climbed to at least 22, officials said on Saturday.