I've seen patent applications with eight or ten co-inventors. Is there an upper limit to the number of inventors you can list, or, theoretically speaking, if a hundred or ten thousand people were involved, could they all be listed?
No limit and in fact you are to list every inventor. However, the definition of an "inventor" often imposes a natural limit. That is, an inventor must contribute to the conception of an idea reflected in the claims. Thus, it generally follows that the number of persons contributing to conceiving an invention does not reach hundreds or thousands. More details on those requirements is in MPEP 2137.01.