D.Angluin, On counting problems and the polynomial hierarchy, {\it Theor. Comput. Sci.} 12, pp.161--173, 1980.