Senegal began counting votes in Sunday’s presidential election as the two main rivals said they were confident of winning a poll that followed several years of unrest and a political crisis.