You keep shooting until you shoot something other than an X, or your time runs out.
Note, this only counts in *registered* tournaments - you can shoot a 200-30X in a local club 'approved' match and it doesn't count as anything special (good job, though!

)
It also only counts if the match program is written so the string is a match in and of itself. A case in point would be where you normally have a Palma + 20rd 1k string. The Palma course (45 record shots) is one 'match' and the 20 rd 1k string is another 'match'. The individual 15 shot strings @ 800, 900 & 1000 that make up the Palma course are not individual matches in their own right... so if you shoot a 150-15X @ 800, you stop, and don't continue firing as it isn't a 'match' where you can set a record for shooting a 150-18X (or whatever).
It is possible for the match director to write and submit a match program that has 800 as match 1, 900 as match 2, 1000 as match 3, the 1k 20 shot as match 4, the Palma agg as match 5, and the daily agg as match 6 (for example), and *then* you could shoot a 150-19X @ 900 and have it count as a national record - if it's recognized by the NRA as something they recognize records *for*, which is a separate bugaboo...