There are a number of prayers, known as "devarim shebekedusha", which may only be recited in the presence of a minyan, ten adult men. Some of the prayers which fall under this category include: barchu, kaddish, kedusha, and the Torah reading, among others. It is interesting to note that reciting the kedusha along with the congregation is considered to be a biblical mitzva in its own right, and one should have this in mind when doing so. We are taught that when ten Jews assemble together for prayer or study, God's presence descends to be with them.
One must never directly count people when trying to determine whether or not a minyan present. Many have the custom to recite the verse, "hoshia et amecha..." or "v'ani b'rov chasdecha" for this purpose, as they are verses which contain ten words. When using this method one points to a different person with each additional word in the verse, effectively counting all who are present. It is also permitted to count those present by counting clothing, such as a kippa or even by counting a body part. For example, one can simply count the number of noses or ears in the room in order to determine if a minyan is present. Some authorities allow one to count people if one does so silently to oneself. Due to the prohibition on counting Jews, there is much discussion regarding the permissibility of participating in the Israeli national census, though this is an issue beyond the scope of this chapter.
There are at least two precedents for the requirement to have ten adult men in attendance in order to form a minyan. The more widely known explanation is that it is derived from the episode of the twelve spies who were sent to scout out the Land of Israel. Ten of these spies returned from their mission only to deliver a blasphemous report about the Land. The Torah refers to these ten evil spies as an "eida", a congregation, from where we derive that a congregation is defined as a unit of ten men.
The other source for the requirement for ten adult men is derived from the story of Yaakov's ten sons who descended to Egypt in order to purchase food while there was a famine in the Land of Israel. The Torah refers to the ten men as a single unit, using the term "b'toch" to describe them. We again find the term "b'toch" used in reference to sanctifying God's name in public.  Through the Talmudic method of interpretation based on word associations, known as the "gezeira shava", our sages derive that sanctifying God's name in public is to be done in the presence of at least ten men.
Further support for the requirement to have ten adult men present for public or congregational matters is found in the book of Ruth where we find that Boaz "took ten men of the elders of the city." Ghosts, golems, and others spirits are not to be counted as part of the minyan even if they appear to be real people.
Some authorities suggest that the requirement for ten men is more of an ancient tradition rather than a biblical requirement. It is interesting to note that although there are those who suggest that the source for a minyan originates with Avraham who begs God to spare the city of Sodom in the merit of "ten righteous people", there is actually no halachic source which supports this theory. Even though a minyan of ten men is required in order for devarim shebekedusha to be recited, only six out of the ten men need to actually be participating in the service.
For the purpose of a minyan, an adult is defined as one who is at least thirteen years old and has reached puberty. It is permitted to assume that every thirteen year old boy has reached puberty and there is no need to make a visual inspection.
 Rambam, Hilchot Tefilla 8:6.
 Tur, OC 55.
 Kaf Hachaim, OC 125:4; Be'er Heitev O.C. 125:3.
 Aruch Hashulchan, OC 55:6.
 Rambam, Hilchot Temidin U'musafin 4:4.
 Tehillim 28:9. Kitzur Shulchan Aruch 15:3.
 Tehillim 5:8. Sefer Ha'itim 174. One can also use the words of the blessing "…hamotzi lechem min ha'aretz" as it too contains ten words
 Kaf Hachaim, OC 53:11.
 Yoma 22b; Magen Avraham 156; Yabia Omer, YD 2:16:9.
 Kaf Hachaim, OC 55:11.
 See Shevet Halevi 1:34, 9:35; Tzitz Eliezer 7:3; Yabia Omer, CM 10:2; Aseh Lecha Rav 6:378.
 Bamidbar 23b; Bamidbar 14:27.
 Kaf Hachaim, OC 53:6.
 Yerushalmi Megilla 4:4.
 Bereishit 42:5.
 Vayikra 22:32.
 Yerushalmi Berachot 7:3.
 Ruth 4:2.
 Kaf Hachaim, OC 53:12.
 Rambam to Mishna Megilla 4:3.
 Bereishit 18:32.
 Sofrim 10:7; OC 69:1.
 OC 55:9.
 Nidda 46a; Rema, OC 55:5; Yabia Omer, OC 4:10.