Then there were two. The primary election for the first wide-open mayoral race in two decades culminated in victory for the top two candidates, Martin J. Walsh and John R. Connolly. The two candidates, one a state representative and the other a city councilor, will meet again on November 5 to vie for Mayor Thomas M. Menino’s role. The much-anticipated election, which hosted 12 candidates, brought Boston voters out in record numbers, with 95 percent of precincts reporting. The final tally showed Walsh in the lead with 18.6 percent of the vote and Connolly close behind with 17.7 percent.