Does the total function sum the numbers in the specified range and then divides the sum by the number of nonzero cells in the range?
To be technically accurate, no function does this. The answer
you are looking for is the AVERAGE function. It divides by the
amount of cells that have values in them, not by the amount of
cells. In most situations, all of the selected cells have values in
them, but there are cases when they don't.