: I think search for "*:*" is the optimal code to do it. I don't think you can : do anything faster.
FYI: getting the data from the xml returned by stats.jsp is definitely faster in the case where you really want all docs. if you want the total number from some other query however, don't "count" them yourself in the client ... use <result numFound="XXX"> -Hoss