def _calculate_n_atoms_(elemental_array):
    """
    Calculates the total number of atoms in the system.

    :param elemental_array: an array of dictionaries as generated by either _create_compositional_array_() or _consolidate_elemental_array_()
    :return: the total number of atoms (can be a partial number in the case of alloys or partial hydrates)
    """
    return sum(a["occurances"] for a in elemental_array)