An atom is the smallest possible amount of an chemical element that still has all the properties of that element. Although you can treat them as discrete lumps of matter, they in turn consist of more fundamental particles, the proton, neutron and electron. Some understanding of the structure of the atom is important because electrons and protons manifest the electric charges that drive everything in chemistry. When working with a sample of an element or compound, you use Avogadro's number to calculate the number of atoms in the sample.
TL;DR (Too Long; Didn't Read)
To calculate the number of atoms in a sample, find the molar mass of the substance, weigh the sample, divide the measured weight by the molar mass, then multiply by Avogadro's number.
Avogadro's Number and the Mole
Avogadro's number, also known as Avogadro's constant, quantifies the number of carbon-12 atoms in a 12 gram sample of the substance. Because atoms are very small, the number is very large, 6.022 x 10^23. Chemists use a unit called the mole to measure a quantity of particles equal to Avogadro's number in a sample; for example, one mole of carbon-12 weighs 12 grams, so the molar mass of carbon-12 is 12 grams per mole. Note that the molar mass of nitrogen atoms is 14.01 grams per mole, but because nitrogen gas has two atoms per molecule, the molar mass of the molecule is 28.02 grams per mole.
Weigh the Sample
Weigh the sample on a gram scale and record the weight. Or, the weight may already have been provided to you; if so, use that figure. For example, after weighing, you find that a sample of aluminum weighs 6.00 grams.
Sciencing Video Vault
Periodic Table Lookup
Find the element on the periodic table and look for the atomic mass, usually the number under the chemical symbol. For samples of pure elements, atomic mass is the molar mass, which in turn is the number of grams per mole. For example, the molar mass of aluminum is 26.982 g/mol.
Divide Weight by Molar Mass
Divide the gram weight of your sample by the molar mass of the substance. The result of this calculation is the number of moles of substance. To continue the example, 6.00 measured grams of the aluminum sample divided by 26.982 g/mol gives .222 moles.
Multiply by Avogadro's Number
Multiply the number of moles in your sample by the atoms per mole, Avogadro's number. The result is the final answer -- the number of atoms in your sample. In the example you calculated .222 moles. Multiply .222 moles by 6.022 x 10^23 atoms per mole to arrive at the answer, 1.34 x 10^23 atoms.