Dear Rawat, For bulk semiconductor materials the doping is measured by the doping density which is the number of dopant atoms per cubic centimeter of the material. It can also given by the ratio of the dopant atoms to the native atoms. In principle by doping the material one gets a solid solution. The doping can be defined as a ratio of masses of the two materials in the solution.
What you named molar fraction is just the ratio of the dopant atoms to the native atoms as i mentioned before. It is the mixing ratio.
In case of very thin film materials you want to define the number of dopant atoms in the width of the ribbon per unit ribbon length as the doping density.I would propose to call it the doping density for certain ribbon width per unit ribbon length. In this case your calculations will be right and meaningful.