I think manufacturers list the number of elements it just so you know how much effort they put into a lens!
There's no simple answer to whether more of fewer elements is preferable. More elements generally means greater correction for distortion, chromatic aberration etc. however this extra correction might be necessary due to the design or the performance characteristics of the lens, not a sign of better image quality. Elements are often paired up, so the number of groups gives you a better idea of the number of corrections.
However the more bits of glass the light travels through the more surfaces there are for reflections etc. so contrast and sharpness can be reduced. As an example, let's compare the Canon 50mm f/1.0L with the Canon 50mm f/1.8II
First the f/1.0 version:

11 elements in 9 groups
Now the f/1.8 version

6 elements in 5 groups
Now stop both down to f/8 and the II would almost certainly be sharper. But which is better? You can't really say, because the first version has an ultra wide max aperture. It's a high performance lens which necessitates a lot of optical correction.
Even comparing the degree of correction can be misleading. You'd think that a better corrected lens is preferable, but it can lead to other defects. Correcting for spherical aberration in particular often makes the bokeh worse (which is why some lenses leave it uncorrected). Lens design is all about compromise.
So in summary, the number of elements/groups can be informative, but it's very rarely an absolute measure of quality or a reason to prefer a specific lens. The more important factors are the inclusion of special types of glass, such as low dispersion, (extra low dispersion) or flourite elements, and aspherical elements which perform better but are harder to make.