Do We Need Kavanah to Make a Minyan?

(ד) יש מתירין לומר דבר שבקדושה בתשעה וצירוף קטן שהוא יותר מבן שש ויודע למי מתפללין ולא נראין דבריהם לגדולי הפוסקי' וה"ה דעבד ואשה אין מצטרפין: הגה ואפילו על ידי חומש שבידו אין לצרפו מיהו יש נוהגין להקל בשעת הדחק. [הרא"ש ומרדכי והגהות מיימוני פ"ט מהלכות תפלה]:

(4) There are those who permit one to say a spoken part [of the service] in which [God's] holiness [is proclaimed] with 9 and a minor that is older than 6 and knows to whom we pray joins [them]. And their words were not seen for the great decisors. And the rule is that a slave or a woman is not joined [to the 9]. Gloss: And even if he has a Chumash [printed Torah] in his hand we do not join him [to the 9], although there are those who follow this practice to be lenient at a time of need [The Rosh and Mordechai and Hagahot Maimoni Chapter 9 of the Laws of Prayer]

(ו) ואם התחיל אחד מעשרה להתפלל לבדו ואינו יכול לענות עמה' או שהוא ישן אפ"ה מצטרף(to join) עמה':

(6) If one of the 10 started to pray and [being in a section where he] could not answer with them or he is sleeping, even this one is included with them.

(יא) עבריין שעבר על גזירת הצבור או שעבר עבירה אם לא נידוהו נמנה למנין עשרה:

(11) Transgressors who transgressed the public decrees or transgressed a transgression: if they do not excommunicate him, then he is counted in the minyan of 10.

(מו) (מו) או שעבר עבירה - כתב הפמ"ג דוקא עבירה שעבר לתיאבון (willingly) אבל להכעיס אפילו בדבר אחד או שהוא מומר לע"ג (idol worship) או לחלל שבת בפרהסיא דינו כעכו"ם ואינו מצטרף:

May a non-observant Jew be counted towards a minyan?

Shulchan Aruch (OC 55:11) rules that a Jew who is not observant may be counted towards a minyan. However, the Pri Migadim (OC 55:4) writes that this ruling of Shulchan Aruch is only true for one who believes in the validity of the Torah, though he fails to be observant in practice. However, one who denies the legitimacy of Torah and mitzvos may not be counted towards a minyan. The Mishnah Berurah (55:46) rules this way as well. Nevertheless, Rav Moshe Feinstein, zt”l(Igros Moshe OC 1:23) writes that if no one else is available one may include a non-believer as well in a minyan and recite Kaddish, Kedusha and Barchu. Rav Moshe reasons that the basis for a minyan is derived from the ten spies. The ten spies rebelled against G-d, and yet they constituted a minyan. If so, we see that all Jews may be included in a minyan, especially a Jew that was never taught to be observant (tinok she’nishbah). ou.org

(ד) כשש"צ חוזר התפלה הקהל יש להם לשתוק ולכוין לברכות שמברך החזן ולענות אמן ואם אין ט' מכוונים לברכותיו קרוב להיות ברכותיו לבטלה לכן כל אדם יעשה עצמו כאלו אין ט' זולתו ויכוין לברכת החזן: [י"א שכל העם יעמדו כשחוזר הש"ץ התפלה] [הגהות מנהגים]:

When the Shaliach Tzibor (prayer leader) repeats the tefillah (of the Amidah), the community must be quiet, and to focus (have kavanah) on the blessings from the Hazan - [the community] responds "amen". And if there is not 9 people with intention for his blessings, this is similar to a blessing in vain. Therefore, each person his will do for himself as if there are not nine others, and he will have intention for the blessings of the Hazan.

תנו רבנן אין עונין לא אמן חטופה ולא אמן קטופה ולא אמן יתומה ולא יזרוק ברכה מפיו בן עזאי אומר כל העונה אמן יתומה יהיו בניו יתומים חטופה יתחטפו ימיו קטופה יתקטפו ימיו וכל המאריך באמן מאריכין לו ימיו ושנותיו

With regard to answering amen, the Sages taught: One should not respond with an abbreviated [ḥatufa] amen, in which the first syllable is not properly enunciated, and a truncated [ketufa] amen, in which the second syllable is not properly enunciated, and an orphaned [yetoma] amen, in which the respondent is unaware of the blessing to which he is responding. Similarly, one should not quickly and indifferently discharge a blessing from his mouth. Ben Azzai says: Anyone who recites an orphaned amen, his children will be orphaned; one who recites an abbreviated amen, his days will be abbreviated and incomplete; one who recites a truncated amen, his days will be truncated. One who extends his amen, they will extend his days and years for him. Nonetheless, one should not prolong it extensively.

תניא רבי יהודה אומר מי שלא ראה דיופלוסטון של אלכסנדריא של מצרים לא ראה בכבודן של ישראל אמרו כמין בסילקי גדולה היתה סטיו לפנים מסטיו פעמים שהיו בה (ששים רבוא על ששים רבוא) כפלים כיוצאי מצרים והיו בה ע"א קתדראות של זהב כנגד ע"א של סנהדרי גדולה כל אחת ואחת אינה פחותה מעשרים ואחד רבוא ככרי זהב ובימה של עץ באמצעיתה וחזן הכנסת עומד עליה והסודרין בידו וכיון שהגיע לענות אמן הלה מניף בסודר וכל העם עונין אמן

It is taught in a baraita that Rabbi Yehuda says: One who did not see the great synagogue [deyofloston] of Alexandria of Egypt never saw the glory of Israel. They said that its structure was like a large basilica [basileki], with a colonnade within a colonnade. At times there were six hundred thousand men and another six hundred thousand men in it, twice the number of those who left Egypt. In it there were seventy-one golden chairs [katedraot], corresponding to the seventy-one members of the Great Sanhedrin, each of which consisted of no less than twenty-one thousand talents of gold. And there was a wooden platform at the center. The sexton of the synagogue would stand on it, with the scarves in his hand. And because the synagogue was so large and the people could not hear the communal prayer, when the prayer leader reached the conclusion of a blessing requiring the people to answer amen, the sexton waved the scarf and all the people would answer amen.

Tosafot

אמן יתומה - שאין שומע הברכה מפי המברך ועונה אחר האחרים ששמעו אמן תימה דהא אמרינן בסוכה (פ"ה דף נא:) באלכסנדריא (Alexandria) של מצרים שהיה שם קהל גדול ולא היו יכולים כולם לשמוע מפי המברך והיו מניפים בסודרים כדי שידעו חתימת הברכות ויענו אמן וי"ל שהיו יודעים באיזו ברכה החזן עומד אמנם (truly) לא היו שומעים אותו אבל הכא מיירי (dealing with) שאינם יודעים כלל (at all) היכן (where) החזן עומד ומתפלל ובאיזו ברכה הוא עומד אלא עונה אחר האחרים בלא שמיעה ולא ידיעה.