The Ben Ish Hai (Rabbi Yosef Haim of Baghdad, 1833-1909), in Parashat Vayehi, presents a number of Halachot relevant to the recitation of Kaddish (listen to audio recording for precise citation). He writes that according to Kabbalistic teaching, the response of "Amen Yeheh Shemeh Rabba" through "Da’amiran Be’alma" must consist of twenty-eight words. Therefore, one should ensure to recite this text precisely, so as not to lose any words. Some people mistakenly recite in this text "Le’ela Mi’kol Birchata," instead of "Le’ela Min Kol Birchata," which results in a total of twenty-seven words, instead of twenty-eight. One must recite the correct text of "Min Kol Birchata" so that he reaches the desired total of twenty-eight words.
The Ben Ish Hai further notes that the congregation’s declaration of "Amen Yeheh Shemeh Rabba" is a response to the Hazzan’s proclamation of "Yitgadal Ve’yitkadash…" The Hazzan declares, "Let the Name of the Supreme One be exalted and sanctified," and the congregation then responds, "Amen – let the Name of the Supreme One be blessed…" Therefore, it behooves everyone in the congregation to listen attentively to the Hazzan’s recitation of Kaddish, and to respond, "Amen Yeheh Shemeh Rabba" with the intention of responding to what the Hazzan said.
If one enters the synagogue in the middle of Kaddish and hears the congregation responding, "Yeheh Shemeh Rabba," he may respond with them. However, he does not recite "Amen" unless he heard the final phrase of the Hazzan’s declaration ("Ba’agala U’bizman Karib…"). The same applies to somebody who completed the Amida as the congregation was responding, "Yeheh Shemeh Rabba." He may join in their response, but he does not recite "Amen" unless he had completed the Amida before the Hazzan had recited the final words preceding the congregation’s response.
The Kaddish recitation requires the presence of at least ten men in the room. If ten men are in the room but some are reciting the Amida prayer, Kaddish may be recited, provided that least five people (besides the Hazzan) are not reciting the Amida. Therefore, the Hazzan may recite the Kaddish after the Amida during Arbit before ten men have completed the Amida, provided that at least five men besides himself have finished the Amida. (Kaddish differs in this respect from the Hazzan’s repetition of the Amida, which requires the presence of ten men who are not reciting the Amida.)
If exactly ten men are present during the recitation of Kaddish, nobody should leave the synagogue; the Sages issued very stern warnings concerning those who leave the synagogue during Kaddish without leaving behind a Minyan. Nevertheless, if somebody did leave, the Kaddish recitation may be completed, since it had begun in the presence of a Minyan, unless fewer than six men (including the Hazzan) remain. However, if the tenth man left before the Kaddish began – even just a moment before it began – the congregation may not recite Kaddish.
Summary: The congregation should listen attentively to the Hazzan’s recitation of Kaddish and respond with concentration. One must ensure to recite "Min Kol Birchata," rather than "Mi’kol Birchata." Kaddish requires the presence of ten men, at least five of whom (besides the Hazzan) are listening and not reciting the Amida. If somebody left during Kaddish, and less than a Minyan remains, the Hazzan may continue Kaddish provided that at least five men (beside him) remain.