KABUL, Afghanistan — The two rival candidates in Afghanistan’s presidential election agreed to abide by the results of a U.N.-supervised recount of the entire poll to settle their dispute over the outcome, U.S. Secretary of State John Kerry said after talks with both men. The recount was scheduled to begin within 24 hours, but was likely to take several weeks, meaning that a presidential inauguration due on Aug. 2 will be postponed. The deadlock over the June 14 election run-off between the leading contenders, Abdullah Abdullah and Ashraf Ghani, has raised concerns about a smooth transition of power in Afghanistan just as U.S.-led troops are leaving.