Your question is mainly semantic. The amount of a substance and number of moles are both unitless quantities (and the same thing). A mole is simply defined as "Avogadro number" of something. That is, 1 mole of (say) carbon atoms is about $6.02\times10^{23}$ carbon atoms. Both have a dimension of 1 (the number one); a mole is conveniently represented as a unit of measurement but doesn't actually hold any physical meaning. Using moles (and derivative quantities, such as molar mass which is the mass of "Avogadro number" items of something) is only a way to avoid extremely large or small numbers.

Another important point is that the variables in an equation only have the meaning you attach to them, so though conventions as to the meaning of each letter in your equations do exist I will answer to your definitions.

Equation (1) is correct - dividing the mass of a sample with its molar mass will give the number of moles.

Equation (2) is incorrect - diving the mass of a sample with the weight of a single item (atom or molecule) will give the number of items, not the number of moles.

Two notes:

 - Common convention is that $n$, and not $A$, is the number of moles. So the most conventionally correct equation is $$n = {m \over M}$$
where $n=[mol]$, $m=[gr]$ and $M=\left[{gr \over mol}\right]$ (brackets are used to denote the unit of measurement of quantities).
 - The reason the second equation usually works is a double error - the atomic "weight" is usually given in number of nuclear particles (protons and neutrons) and not in actual weight units. This number is very close to the molar weight in ${gr \over mole}$ (on purpose, the definition of a mole is meant to be this way), but these are different quantities. Many chemistry books tend to confuse them. The actual atomic or molecular weight (in grams) of a single particle is very small and it is not likely you will actually use it much.