This is a similar problem to a naval blockade, but in three dimensions. If you naively considered blockading an enemy coastline you might think you can't do it, there's thousands of miles of coastline, they can launch from anywhere. But in reality there are only a few discrete points on the coast that vessels worth blockading will launch from: ports. Areas with the combination of a good harbor and the facilities to load and unload large cargo and fuel and maintain ships. In reality, you only need to blockade a few points along the coast.
Similarly for space flight, you only have to blockade the major launch and cargo facilities. Depending on the technology maybe it's space elevators, maybe it's space ports, maybe they're just conveniently close to industrial and trade centers.
The other reality is there are only so many places major cargo ships will go. If you know their major trading partners, you can position ships along their route to them. If they go around you, you have still succeeded in slowing down their trade. One cargo ship making two 10 day trips carries as much as two ships taking 20 days.
Finally, what is the point of your blockade? If it's a commerce war, rather than blockading all cargo vessels you may wish to simply destroy the enemy's commercial fleet. This was the strategy of the German U-Boat campaigns of WWI and WWII. It doesn't matter how much cargo you have if you don't have the ships to move it. Once the enemy's commerce fleet is destroyed, your military vessels can move on to doing something more important.
What about a blockade of the military? During the Napoleonic Wars, the British bottled up the French Fleet keeping it divided. This allowed the British to freely use the seas without having to protect convoys with large military escorts. Individual vessels which slipped by were annoying, but not a threat to the war effort. This was only possible because the British fleet was measurably more powerful than the French, each blockading British fleet could overpower the French fleet coming out to fight it. The French fleets could not unify to destroy the scattered blockading British fleets.
However, the fact that the French Fleet existed caused the British to devote far larger numbers of ships to the blockade than they may have lost simply fighting them. This is known as a Fleet In Being. It means the blockading force is better off destroying the opposing fleet than blockading it. Much of the naval strategy of WWI was devoted to each side trying to divide and destroy the other's fleet. In reality, they mostly sat and watched each other. The inferior German fleet, merely by continuing to exist, prevented the British from mounting a major invasion of Northern Europe to outflank the trench lines.
So generally you want to destroy the fleet rather than spend the war blockading it.
Which you are doing depends on whether it's going to be a close, distant or loose blockade. Each has their advantages and disadvantages. Close blockades take a lot of ships, and you asked for the minimum number of ships, so it will have to be a distant or loose blockade.
A distant blockade would use smaller, cheaper means to watch for cargo vessels (spies, small ships, long range sensors, satellites) and send military vessels after them. Since cargo ships tend to be slower than military vessels (for fuel and cost efficiency) this tactic can work.
A loose blockade would feature your blockading ships hiding nearby and outside of sensor range to lull the enemy into a false sense of security. They come out, and are detected and destroyed.
The minimum number of vessels to implement a loose or distance blockade of a solar system with the goal of dividing and destroying the enemy fleet (military or commercial) depends on...
- The number of enemy ports
- The number of their trading partners
- The relative speed of their vessels vs yours
- The relative size and quality of their military vs yours
- The quality of your sensors
Can't give a specific number.