There are two questions here, one historical (what was meant by “the votes of Pennsylvania & Co.”), and one grammatical (the meaning of “they may as well lie to and repair”).
Taking the historical question first, Thoreau was speaking on October the 30th, 1859 (ten days after John Brown’s raid on Harper’s ferry), while Brown was on trial in Charles Town, Virginia (in modern-day West Virginia.) As a strong abolitionist, Thoreau strongly supported Brown and his actions. In referring to “the votes of Pennsylvania” Thoreau is clearly referring to some recent event, sufficiently important that the audience immediately knew to what he is referring. Of course more than 160 years later it is hard for us to see what would have been so obvious to the crowd. I believe that there is just one strong candidate: the mid-term elections for James Buchanan’s government.
These took place from 1858 - 1859, depending on the state, and were catastrophic for Buchanan. To simplify his position, Buchanan wanted to preserve the status quo, while the election gave a strong swing toward the newly-formed Republican party that opposed slavery. Wikipedia notes that:
Winning a plurality for the first time, Republicans benefited from
multiple factors… and a sharp decline in President Buchanan's
popularity due to his perceived fecklessness. In Pennsylvania, his
home state, Republicans made particularly large gains.
In an article in The Pennsylvania Magazine of History and Biography, the importance of this election is emphasised even further, terming it a “crucial breakthrough”:
the crucial breakthrough for the Republicans occurred in 1858, when
the state went dramatically against the Democrats. President Buchanan
wrote in October: "We have met the enemy in Pennsylvania and we are
theirs. This I have anticipated for three months, and was not taken by
surprise except as to the extent of our defeat. . . . It is so great
that it is almost absurd."
So as Thoreau remarked, the Republicans had already taken, or “counted”, the votes of Pennsylvania and the other states that rejected Buchanan and his policies. He goes on to say “but they have not yet correctly counted Captain Brown’s vote”, meaning that Brown’s action will cause even more voters to turn against Buchanan and support the Republicans.
Thoreau then continues with a nautical metaphor, “He has taken the wind out of their sails, the little wind they had, and they may as well lie to and repair”. To “take the wind out of someone’s sails” originates from a sailing ship being deprived of wind by another sailing ship upwind, intercepting the current of air. From this it has come to mean “causing someone to lose confidence or energy” (Merriam-Webster). The Republican party had built up some movement towards Abolitionism, but this small progress has been completely eclipsed (to use a different metaphor) by Brown’s direct action. As a result they may as well “lie to and repair”. This is an extension of the nautical metaphor; when a ship lies to, it steers into the wind so that it comes to a stop. It is not connected to the more common use of “lie” as in “to tell falsehoods”. “Repair” is used here in the sense of “to come together and rally”.
So in summary, following Brown’s dynamic action, the Republicans may as well abandon their cautious steps, and gather together to decide how to proceed in the future. Presumably Thoreau would like them to throw their support firmly behind Brown.