What determines osmotic pressure?
The concentration of solute particles determines the osmotic pressure of a solution.
In the diagram above, a semipermeable membrane separates a concentrated sugar solution on the left from a dilute sugar solution on the right.
The pores in the membrane are small enough so that the water molecules can pass through it in both directions. The sugar molecules are too large to pass through in any direction.
The water molecules pass from right to left in an attempt to make the concentrations of the solutions equal on both sides of the membrane. This raises the water level on the left and decreases the level on the right.
This difference in height causes an increased pressure in the left hand chamber. This tends to push the water molecules back to whence they came.
Water molecules will move from right to left until the pressure of the column of liquid is high enough to prevent any more water molecules from entering. The pressure at this point is called the osmotic pressure.
The identity of the particles doesn't matter. It is their concentration that counts.
Note that a 1 mol/L solution of NaCl will have twice the osmotic pressure of a 1 mol/L solution of sugar. The NaCl dissociates to give Na⁺ and Cl⁻ ions, so 1 mol of NaCl has twice as many particles in solution.