What's the maximum number of planets that could orbit the sun?

If a super-advanced civilization had to ability to engineer the solar system from scratch, how many planets could they squeeze around the sun?

What's the maximum number of planets that could orbit the sun?
If a super-advanced civilization had to ability to engineer the solar system from scratch, how many planets could they squeeze around the sun?