(a) At the time appointed by the municipal governing body to canvass the returns of the election the municipal clerk shall deliver to the governing body the envelopes addressed to the governing body, which were delivered to him or her by the returning officers of the several wards in the city or town immediately after the votes had been counted and the returns thereof prepared.
(b) The clerk shall securely keep the ballot boxes until it is known that there will be no contest, but in any event not less than six months, and, if in that time no contest has been properly instituted, the clerk shall then destroy the contents of the boxes without examining the same.
(c) No ballot box shall be opened except in one of the following events:
(1) In the event of a contest, where the opening of a box has been ordered by the court hearing the contest, in which event the ballot box shall be opened by or under the supervision of the judge ordering the opening of a box and in the manner prescribed by him or her.
(2) For the purpose of canvassing the returns and obtaining the result of the election in a particular ward or voting district from the contents of the box when the box has been returned, but no certificate of the result of the election has been separately delivered to the municipal governing body by the election inspectors. If a box is opened for this latter purpose the certificate of result contained therein, if any, and if no certificate of result is enclosed, then any other of the contents of the box, so far as necessary, may be used to determine the result of the election, after which the papers shall be returned into the box and the box shall be resealed in the presence of the municipal governing body, and the box shall then be retained without again opening it for the time prescribed in subsection (b).
(3) For the purpose of conducting a recount of the ballots as otherwise allowed by law.