The Status of a Sleeper — Eruvin 38b
תלמוד בבלי מסכת עירובין דף לח/ב
עד כאן לא פליגי רבנן עליה דרבי יוחנן בן נורי אלא בישן דלא מצי אמר אבל בניעור דאי בעי למימר מצי אמר אף על גב דלא אמר כמאן דאמר דמי.
"The Shechinah rests" on any group of ten (male) Jews. Indeed, Rabbeinu Tam (Tosafos, Berachos 48a d.h. V'leis) maintains that this is the case even if one of them is a baby in his cradle! Thus, Hagahos Maimonios (Hil. Tefillah 8:9 in the name of Maharam) writes that even if one of the group is davening and not paying attention to a shaliach tzibbur, the group is still considered complete and may recite devarim she'b'kedushah. Maharil (Teshuvos, §150) extends the logic further, and rules that even a person who is sleeping may be included in a minyan — despite the ruling of the Rosh (Teshuvos 4:19), that all of the other nine men must be paying attention to the shaliach tzibbur. Maharil suggests that his own ruling may be sustained on the basis of the custom to include everyone present in a minyan, even if they are involved in mundane conversations. Nevertheless, concludes Maharil, perhaps the principle that "mixing does not impede any amount that is capable of being mixed, but mixing does impede an amount that is not capable of being mixed" (כל הראוי לבילה אין בילה מעכבת בו וכל שאין ראוי לבילה בילה מעכבת בו) requires that the person be awake, and capable of responding to the devarim she'b'kedushah, even if he does not respond. Hence, a person who is asleep and incapable of responding could not be included in a minyan.
In our Gemara, the Sages maintain that a person who is awake may transact eruvei techumin even if he does not articulate the proper formula; while a person who is sleeping may not transact eruvei techumin. R' Yosef Engel (Gilyonei HaShas) notes that our Gemara clearly reflects the dissenting position — viz., that the person need at least be awake.
Mishnah Berurah (54:32) rules that one should certainly not include more than one sleeping person, since many authorities rule that even one sleeper cannot be counted towards the minyan. (See Emek Berachah pp. 13-14 that the source for the inclusion of one, and no more, is the Gemara in Berachos [loc. cit] which considers the inclusion of a Sefer Torah or Aron in a minyan, but only as the "tenth man." See also Rashi to Bereishis 18:32).