The count had its own “Envelopegate” – after the returning officer announced the wrong winner.