Hello!
First, find the molar mass of Carbon-12. It is defined as 12 g. Now, see how many moles are in the 6 grams of that sample.
6 / 12 = 1/2
Therefore, there are 1/2 moles in the 6 gram sample. Now, take Avogadro's number, or how many atoms there are in a mole. Avogadro's number is 6.02214076×10²³. (approximately)
Now, since you know we have 1/2 of a mole, take 1/2 of Avogadro's number to see how many molecules are in 1/2 of a mole.
1/2 * 6.02214076×10²³ =roughly 3.01×10²³
Therefore, your answer is 3.01×10²³.
Hope this helps!