We study numerically the appearance and number of axial vortices in the outlets of X-shaped junctions of two perpendicular channels of rectangular sections with facing inlets. We explore the effect of the aspect ratio of the cross section, AR, on the number of vortices created at the center of the junction. Direct numerical simulations (DNSs) performed for different values of the Reynolds number Re and AR demonstrate that vortices with their axis parallel to the outlets, referred to as axial vortices, appear above critical Reynolds numbers Rec. As AR increases from 1 to 11, the number of vortices observed increases from 1 to 4, independently of Re. For AR = 1, the single axial vortex induces an interpenetration of the inlet fluids in the whole section; instead, for larger AR’s for which more vortices appear, the two inlet fluids remain largely segregated in bands, except close to the vortices. The linear stability analysis demonstrates that only one leading eigenmode is unstable for a given set of values of AR and Re. This mode provides a simplified model of the flow field, reproducing its key features such as the number of vortices and their distance. Its determination with this method requires a much smaller computational load than the DNS. This approach is shown to allow one to determine quickly and precisely the critical Reynolds number Rec and the sensitivity function S, which characterizes the influence of variations of the base flow on the unstable one.