How to calculate the number of water molecules of a hydrate based on mass loss upon heating?
Determine what the $\pu{2.388 g}$ is.  


   It's the amount of water lost from the crystal structure, assuming the sample was heated enough for this purpose.

What does 'mole' mean? Isn't it just an indicator of the number of atoms/ions/molecules? So, what would be the relation between the quantity sodium sulfate and water molecules?  


   Yes, 'mole' is an indicator of quantity. Take a look at the formula: $\ce{Na2SO4.nH2O}$. What does that mean? It means in a unit, there are $n$ water molecules trapped inside the crystal framework, which consists of sodium and sulfate ions.

How do you proceed into finding the amount of substance (in mole)?


   You need to somehow 'remove' any unknown variables to calculate the amount of substance, so you need to remove $n$. Try subtracting the amount of water from the weight of the whole sample:
 $$m(\ce{Na2SO4.nH2O}) - m(\ce{H2O}) = m(\ce{Na2SO4})\\ \pu{4.250 g} - \pu{2.388 g} = \pu{1.862 g}$$

How many grams of anhydrous $\ce{Na2SO4}$ are there? What is the formula to convert that into moles? How many moles of $\ce{Na2SO4}$ are there?


   The formula is $\displaystyle \mathfrak{n}=\frac{m}{M}$ where $m$ is mass, $M$ is molar mass and $\mathfrak{n}$ is the amount of substance. Thus $\displaystyle \mathfrak{n}=\frac{\text{mass of anhydrous sample}}{\text{molar mass of sodium sulfate}} =\frac{1.862}{142} = \pu{0.0131 mol}$.

You found how many moles of sodium sulfate are there. Isn't that going to be the same for water? Plug into the formula; and find $n$.


   We know that for in any unit of Gluber salt, there are 2 sodium ions, one sulfate ion, and $n$ molecules of water. Thus, it's safe to assume that $\mathfrak{n}$ for water is $n$ times that of what we found for sodium sulfate.
 $$\begin{align}0.0131\times n &amp;=\frac{2.388}{18} \\ &amp;= 0.132\bar{6} \\ \Rightarrow n&amp;=10\end{align}$$