Yes, the mass of an object depends on the number of atoms it contains. Atoms are the basic building blocks of matter, and each atom has a specific mass associated with it. The total mass of an object is the sum of the masses of all the atoms within it.
The mass of an individual atom is determined by the combined mass of its protons, neutrons, and electrons. Protons and neutrons are found in the nucleus of an atom and contribute most of its mass, while electrons, which orbit the nucleus, have a much smaller mass. However, when calculating the mass of an object, the contribution of electrons is typically negligible compared to that of protons and neutrons.
Therefore, if you increase the number of atoms in an object, its total mass will also increase. This relationship holds true as long as the object does not undergo any nuclear reactions or changes in its atomic composition.