(ii) LIMITATION .—Aliens described in subsection (a)(2)(C) from noncontiguous countries shall not be included in calculating the sum of aliens encountered.
So aliens not from Canada or Mexico (i.e. the rest of the world) don't count in the trigger for the border emergency authority.
OBTW, the border is never really "closed" as they still permit 1400 per day, even under the "emergency". Page 219:
(1) IN GENERAL .—During any activation of the border emergency authority under subsection (b), the Secretary shall maintain the capacity to process, and continue processing, under section 235 or 235B a minimum of 1,400 inadmissible aliens each calendar day cumulatively across all southwest land border ports of entry in a safe and orderly process developed by the Secretary.
(Why are we admitting "inadmissibles"?)