Let R be an atomic integral domain. R is a half-factorial domain (HFD) if w
henever x(1) ... x(n) = y(1) ... y(m) for x(1), ..., x(n), y(1), ..., y(m)
irreducibles of R, then n = m. A well known result of L. Carlitz (1960, Pro
c. Amer. Math. Soc. 11, 391-392) states that the ring of integers in a fini
te extension of the rationals is a HFD if and only if the class number of R
is less than or equal to 2. If R is such a ring of integers with class num
ber 2, then we use some simple Krull monoids to develop a formula for count
ing the number of different factorizations of any integer x into products o
f irreducible elements of R. (C) 1999 Academic Press.