Suppose we have in a box $3 \,{\rm mol}$ $\ce{O}$ and $3 \,{\rm mol}$ $\ce{N}$. Is the addition of these two quantities meaningfull? We do it all the time when we want to find the molar fraction. I can't understand if it dimensionally correct to add these two things. If a mole is like a dozen then a mole of eggs and a mole buildings can't add up.
I think a crucial step that is omitted when we want to find the molar fraction is that we should convert these moles of arbitrary entities (eggs, buildings, molecules) to same entities. I can't find anything else to justify such a process (addition of different kind of moles). Would be the following way a proper way to find the mole fraction? $$n_{_{T}}= \frac{\,{\rm mol} \, \text{of molecules}}{\,{\rm mol} \, \text{of O molecules}}\cdot n_{_{O}} + \frac{\,{\rm mol} \, \text{of molecules}}{\,{\rm mol} \, \text{of N molecules}}\cdot n_{_{N}} $$
So $n_{_{T}}= 6\,{\rm mol}$. What about the molar fraction of oxygen? $$\chi_{_{O}}=\frac{n_{_{O}}}{n_{_T}}= \frac{\text{3 mol of O molecules}}{\text{6 mol of molecules}}=0.5 \text{ of what?}$$
We know the ratio must be dimensionless but why? We deviding moles of $\ce{O}$ molecules by moles of molecules. Are these units different or not?