317. (1) There must be a re-addition of the votes if it is made to appear, on the affidavit of a credible witness, that the returning-officer has improperly added up the votes; and there must be a recount if it is so made to appear that a deputy returning-officer has illegally counted or rejected any ballot-paper or has made an incorrect statement of the number of votes cast for any candidate.
(2) There must also be a recount when the returning-officer has declared that there is a tie. In such case the application shall not be subject to the provisions of sections 319, 320, 335, 336, 337 and 338.