The custom of the minyan is only rabbinic in origin. When examining the minyan’s origins, it is vital we remember that this custom is not something that is etched in stone. However, as a custom, it does have a rich and variegated history that cannot be reduced to a single point of view–nor should it be.
The origin of the minyan is discussed in the Talmud. Some expositions are much more oblique than others , while other suppositions are by far, more lucid. The Midrash Tanchuma (Parshat Miketz 6) explains that since the time of Abraham’s famous defense of the Sodomites, namely that a “congregation” consisted no less than ten people, for ten constitutes an “edah” a “community.” On the other hand, that both Talmudic traditions stress only men make up a “congregation,” even though the Abrahamic story clearly indicates that women also made up part of the minyan Abraham was seeking to extricate!! 
On the other hand, there are other rabbinical passages dating back to the Gaonic era (8th-10th centuries) that in Palestine, a minyan consisted may have consisted of seven or six people.
The liturgical historian Abraham Milgram notes that after WWII, a number of Jewish communities actually went back to counting six or seven people as a “minyan,” until the time their ranks would grow in number. This specifically happened in the city of Dubrovnik, Yugoslavia. Incidentally, the framers of the Halacha were well aware of this possibility and its antecedents in Jewish tradition. In functional terms they ruled, if a prayer leader began saying the Kaddish, or for that matter any other portion of the service that would ordinarily require ten people, one may conclude any of these services so long as at least six men remain in the sanctuary.
Some sources suggest that even nine people could constitute a minyan so long as the Ark is open; this does not mean that the “Ark is a person,” but rather God’s Presence can also make up as the “tenth man” so to speak. There is some Aggadic basis for this custom. When Joseph disappeared, the verse later says that “his father wept for him,” which could mean either Jacob (the plain meaning of the text) or possibly, Isaac. One Midrashic account raises an obvious question: “If Isaac knew that Joseph was alive, why doesn’t he reveal this fact to Jacob?” The Midrash answers, “The Holy One, blessed be He, has not revealed it to him; am I then to reveal it to him?” This statement gave rise to the odd rabbinic theory that God was part of the brothers’ conspiracy never to reveal the whereabouts of Joseph!!
Elsewhere, the Halacha mentions a number of other secondary Halachic references indicate that even a child may be used to make up the 10th person of a minyan—so long as he knows how to pray or holds a chumash in his hand (O.H. 55:4, see Mishnah Berurah on note 24), or according to another Ba’al HaMaor (cited in by the Rav 55:5), even four minors may be added to the minyan. One medieval source, Rabbanu Simcha adds that even a woman may count as the tenth person; it is remarkable that R. Sheneir Zalman of Liadi rules in his Rav’s Shulchan Aruch (O.H. 55:5) that one may rely on this lenient opinion—despite the fact that one would never expect to see such a leniency ever practiced in a Lubavitcher minyan!!
This type of reasoning is called, “pilpul” (pepper), and such didactic approaches while they may be interesting, are obviously far from being the contextual meaning of the text.
When examining rabbinic traditions regarding the minyan, it is important to bear in mind that in rabbinic times, only men attended the congregations to pray. In reality it is not the interpretation of the verse that creates the custom, but quite the reverse: it is the already existing custom that creates the interpretation that justifies its etiology. Nowadays, since women also form a part of our society’s leadership, there is ample reason to argue that a woman should be included as part of the minyan. As social realities change, so too does the interpretation. This is the way it has always been, there is no logical or compelling reason to think otherwise.
One traditional source in T.B. Megillah 23b records that a minyan derives a semantic connection regarding the word “midst,” mentioned in the precept of sanctifying God’s Name (Lev. 22:32) and another passage that speaks about Moses and Aaron separating themselves from the “midst,” of the congregation (16:21). Concerning the latter, the term “midst” is used in conjunction with the phrase “congregation,” i.e., the ten spies who brought back a negative report of the Land of Israel. This interpretation is hopelessly contorted and forced.
 Tractate Soferim 10:8. According to the Zohar: זוהר – השמטות כרך א (בראשית) דף רנה עמוד א
, וכשאינה מוצא חוזרת ופותחת ואומרת רבש”ע אולי ימצאון שם עשרה כלומר אולי ימצא ביניהם מי שעוסק בעשרה מאמרות ובעשרת הדברות בכל יום וכן אולי ימצאון ביניהם עשרה שמקדימים לבית הכנסת דהא תנן כל הנמנה עם עשרה ראשונים לבית הכנסת נוטל שכר כנגד כלם שבאים אחריו מה כתיב לא אשחית בעבור העשרה כל זה יש לנשמת הצדיק ללמד סניגורייא וזכות על הרשעים להשקיט האף והחמה וכיון שלא מצאה שום זכות ללמד
 Rabbanu Yona of Gerona (ca. 14th century, Spain) notes that not all rituals which sanctify the Almighty’s name are classified as “de’varim shebikdusha” ( BT Berachot 21a, s.v., “v’nik’dash’ti”). Such examples would include: Kedusha, Cha’zor’at Hashatz, Ne’si’at Kapayim, K’riat Hatorah, or the recitation of the Haftorah with its accompanying blessings. Simply put, the acceptance of the heavenly yoke in the recitation of the “Shema” is not a precept requiring a minyan per se. Wherever there is a sanctification of God’s Name, that is where a minyan is thus required. These specific services cannot be performed in the absence of the minyan quorum. There are other important implications with respect to the precept of martyrdom that requires that one be willing to die in the presence of at least ten Jews–and Maimonides makes no distinction about the gender or even the age of these individuals. Since the laws of minyan derive from this particular biblical precept, it follows that there is ample room for a different and newer kind of deconstruction of the minyan concept that modern Orthodox rabbis have neglected to consider.
 O.H. 55:2, with the Mishnah Berurah’s notes.
 See Genesis Rabbah 84:22.