Immediately after the official results of a state primary or general election in a county are ascertained, the county auditor or other election officer shall make an abstract of the number of registered voters in each precinct and of all the votes cast in the county at such state primary or general election for and against state measures and for each candidate for federal, state, and legislative office or for any other office which the secretary of state is required by law to canvass. The cumulative report of the election and a copy of the certificate of the election must be transmitted to the secretary of state immediately. The county auditor or other election official may aggregate results from more than one precinct if the auditor, pursuant to rules adopted by the secretary of state, finds that reporting a single precinct's ballot results would jeopardize the secrecy of a person's ballot. To the extent practicable, precincts for which results are aggregated must be contiguous.