The authors introduce and investigate three natural new counting classes, which are abbreviated as #L, span-L, and opt-L. “Functions in #L count the number of accepting computations of a nondeterministic log-space-bounded Turing machine, functions in span-L count the number of different output values of such a machine with additional output tape, and functions in opt-L compute the (lexicographic) maximum of all output values.” Complete functions from graph and automata theory are exhibited for all three classes. The authors then show that #L and opt-L are contained in NC2. The corresponding functions can thus be computed in polynomial time. It is interesting that, in contrast, span-L is similar to #P. The authors show the inclusion span-L⊆#P and prove that #P is log-space metric reducible to span-L. The class P(span-L) equals P(#P), a complexity class that contains, by a result of Toda, the whole polynomial-time hierarchy. Nevertheless, the authors show that #P and span-L are different unless NL=P=NP.