Modular Synthesis of Provably Correct Vote Counting Programs