as Jim Moor wisely said... "use dimensional analysis"
There are countless websites out there that discuss it.. I add my 2 cents in my answer here
https://answers.yahoo.com/question/index?qid=20160219172026AAr3J7B
and my discussion of molar vs molecular vs atomic masses here
https://answers.yahoo.com/question/index?qid=20151203052124AAO9Ulf
*******
go through those links. then we setup the solution like this
.. ___ g.. .... 1 mol... . 6.022x10^23 molecules (or atoms or whatever)
--- ---- ---- x ---- ---- x --- ---- ---- ----- ----- ---- ---- ---- --- ----- ---- ---- ---- = ___ molecules (atoms or whatever)
.. .. ..1... ... .. ___ g.. ... .... ... .. .... ... ... 1 mol