The number of moles that are present in a liter of a solution is called Molarity. Mole is the unit of Molarity.The concentration of the solutes that are present in a solution refers to Osmolarity . The unit is osmol. This helps in observing the movement of water from one side to another side of a semipermeable membrane.
The main property of salts that helps to understand the differentiation between the molarity and osmolarity is the salts Ionization. One mole Na+ and one mole of Cl- is produced by the dissociation of a mole of sodium chloride occurs. The diffusion of water is the osmosis. Here, the one molar sodium chloride solution produces a osmotic pressure which is high than one molar glucose solution and this will not undergo dissociation.
Because if you change two things then you do not know which one has affected or altered the dependent variable. if you only change one then you know what exactly changed and why