There is no fixed limit. First you'd have to define a planet. I believe the IAU's definition only applies to our solar system. If a planet can be anything larger than a speck of dust, then the number for our sun is probably in the quadrillions.
Our solar system is said to be "dynamically full". That is, you can't place a planet inbetween any other two planets and have it remain stable for long periods of time. So for our solar system, you only hopes of adding more planets would be exterior to Neptune. And I believe there's room for one more interior to Mercury.
Our solar system stopped producing planets beyond Neptune because the disk of material didn't have enough mass at that distance, and or the orbital velocities are too slow at that distance to ensure that enough collisions take place.
Additionally, stars in binary systems have their stable zones limited by their binary partners, but there could be planets orbiting the pair of stars from a great distance.
And stars that spend too much time in star clusters can have their outer planets stripped away by close stellar encounters.
So its a function of a lot of things.