Section 32. Ballots shall be prepared and provided, and the number thereof determined, in state and presidential primaries by the state secretary, in city and town primaries by the city or town clerk. Notwithstanding the provisions of section forty-five of chapter fifty-four or any other general or special law to the contrary, the state secretary may provide only paper ballots for a state or presidential primary in a city or town where a political party has enrolled fewer than five percent of the total number of registered voters, as of the most recent count submitted to the state secretary under section thirty-eight A before the decision to prepare said ballots must be made. No other ballots shall be received or counted, except that if ballots provided for a state or presidential primary are not delivered, or after delivery lost, destroyed or stolen, ballots similar as far as possible shall be provided by the city or town clerk and used at the primary. The number of ballots provided at a city or town primary shall not for any ward or town exceed one ballot of each party for each voter therein.