yes, absolutely right...
we fill a flask with a known mass, at a known volume, temp & pressure ....then calculate moles
this is a link to the complete lab experiment
http://web.centre.edu/miles/che135/che135labs/Molecular%20Weight%20by%20the%20Dumas%20Method.pdf===================================
you can also find moles by dissolving some weighed protion into a solvent & measure the freezing point drop , or the boiling point rise
the following is all quoted from :
http://en.wikipedia.org/wiki/Molar_massFreezing-point depression
Main article: Freezing-point depression
The freezing point of a solution is lower than that of the pure solvent, and the freezing-point depression (?T) is directly proportional to the amount concentration for dilute solutions. When the amount concentration is expressed as a molality, the proportionality constant is known as the cryoscopic constant (Kf) and is characteristic for each solvent. If w represents the mass fraction of the solute in solution, and assuming no dissociation of the solute, the molar mass is given by
M = w Kf / dT
[edit] Boiling-point elevation
Main article: Boiling-point elevation
The boiling point of a solution of an involatile solute is higher than that of the pure solvent, and the boiling-point elevation (?T) is directly proportional to the amount concentration for dilute solutions. When the amount concentration is expressed as a molality, the proportionality constant is known as the ebullioscopic constant (Kb) and is characteristic for each solvent. If w represents the mass fraction of the solute in solution, and assuming no dissociation of the solute, the molar mass is given by
M = w Kb / dT