100 shots is the limit for Nikon's continuous shutter. You can try the shutter again after 100 shots.
Or you can use the Interval Timer, both D5100 and D5200 have it. It will allow up to 999 shots.
But if you are using the 30 second shutter setting, be aware the actual shutter time is 32 seconds for Nikon cameras. The interval timer must be set for an interval of 33 seconds because of the actual shutter time. A 30 second shutter cannot work right with interval of 31 seconds, because the shutter is actually open for 32 seconds.
This is a very common problem for star trail shots, and 33 second intervals when using Nikon cameras is the easy answer. Other cameras may use actual shutter speeds of 30 seconds, so for those cameras an interval of 31 seconds would be optimal.
Explanation:
The nominal marking of shutter speed is just an easy approximation of base 2 numbers (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, etc.) expressed in more even base 10 numbers (2, 4, 8, 15, 30, 60, 125, 250, 500, 1000, etc) that are easier for most of us to understand and work with. With fractional shutter speed settings (1/125, 1/250, 1/500, 1/1000, etc.) most all cameras actually aim for the base 2 numbers (1/128, 1/256, 1/512, 1/1024, etc.). But when shutter speeds longer than one second are set on some cameras, such as the Nikon D5100 and D5200, they use the base 2 values (2, 4, 8, 16, 32) while other cameras use the labeled base 10 values (2, 4, 8, 15, 30).
More detail about the theoretical differences of actual stops as powers of 2 and √2 compared to the round numbers we assign to them can be seen at http://www.scantips.com/lights/fstop.html
See also Is there a sane reason why ¹⁄₁₂₅ is not, instead, exactly half of ¹⁄₆₀?