The Shulhan Aruch (O.H. 55:13-20), explains the parameters of where members of a Minyan must be located in order to be counted as part of that group. One case (ibid:16), which is based on a discussion in the Gemara (Eruvin 92), is when there is small room which opens up to a large room. In such a case, if one person (or the minority), for example is in the small room and nine (or the majority) in the large room, then the small room is considered an annex to the larger room and therefore, the person in the small room becomes incorporated into the group in the larger room. If, however, there are nine people in the small room and only one in the large room, then the minority does not become incorporated into the majority since the large room cannot be considered an annex to the smaller room. Another case is when there are nine people in the sanctuary and the Shaliah Tzibur is on a raised and enclosed Teva. The Shulhan Aruch, nased on the Rashba (Teshuvot HaRashba 96), rules that despite the Teva appearing to be a separate entity, it is part of the remainder of the sanctuary and the Shaliah Tzibur counts towards the Minyan.
These examples are relevant since many of the Tevot used in Morocco were enclosed with walls and were raised slightly. Furthermore, it is common nowadays to have a synagogues with a Mehitza on the same floor which sections off an area of the sanctuary. Rabbi Ben Zion Abba Shaul (Or Lezion, vol. I, § 15) writes that these areas are part of the larger sanctuary and therefore so are those praying within them. Additionally, Rabbi Yitzhak Assebag (Ohel Yitzhak) [also known as the Pahad Yitzhak and was the mentor of Rabbi Shalom Messas] writes that an elevated Ezrat Nashim (women’s section) which is separated by a Mehitza is considered as part of the sanctuary, and so if a man is located there he could count as part of the general Minyan. It does not appear that this ruling also applies to a balcony-type Ezrat Nashim, but it is possible that even in that case, if the person in the balcony can make eye contact with those below, he might be counted towards the Minyan.
The aforementioned ruling of the Shulhan Aruch refers to two distinct rooms which open up to each other. However, in a sanctuary where there is an area which is partitioned off, or which has a smaller connected room off to the side, it is all considered one continuous area. As such, even if the minority of the group is in the larger section, it can combine with those in the smaller area to form a Minyan.
Summary: One can be counted towards a Minyan if one is located in a partitioned area of a sanctuary, in a side room with an open connection, in a slightly elevated women’s section or in the Teva.