This article is from the Photographic Lenses FAQ, by David Jacobson with numerous contributions by others.
The number of elements is the number of pieces of glass used in the lens. Single uncemented elements or two or more elements cemented together are called a group. Thus a lens that has 8 elements in 7 groups has 8 pieces of glass with 2 cemented together. It is impossible to completely correct all aberrations. Each additional element the designer has at his/her disposal gives a few more degrees of freedom to design out an aberration. So one would expect a 6 element lens to be better than a 3 element lens. However, each surface also reflects a little light, causing flare. So too many elements is not good either. Note that an unscrupulous manufacturer could slap together 13 pieces of glass and claim to have a 13 element lens, but it might be terrible. So by itself the number of elements is no guarantee of quality.