How can I calculate osmolarity from molarity?

osmolarity = number of moles dissolved in water (i.e. the morality) $\times$ number of ions each molecule splits into when dissolved.