Not as a single prompt (at least not without recreating your own version of ssget using a grread loop).
I would instead suggest something like this:
(defun c:test ( / qty tmp )
(initget 6)
(if
(setq qty
(cond
( (getint "\nNumber of details <select>: "))
( (setq tmp (ssget))
(sslength tmp)
)
)
)
(progn
(princ (strcat "\nThe user specified " (itoa qty) " object" (if (= 1 qty) "." "s.")))
;; do something else
)
)
(princ)
)