The Legislature or the committee before which a contested election is pending may issue a writ to the election commissioner or county clerk of the county in which the contested election was held commanding him or her to open, count, compare with the list of voters, and examine in his or her office the ballots which were cast at the election in contest and to certify the result of such count, comparison, and examination to the Legislature.