There are both analog and digital display Yami hour meters. Both types appear to have a 4 digit display of hours or a 5 digit when the rightmost digit measures tenths of an hour. So I guess the rollover would be at 9999 or 9999.9 hours.
Usually the meters are driven by signal that is on when the ignition is on. That means if for whatever reason, the ignition is on but the motors are not started, the hour meter will still count. No big deal I suppose. The important thing to note is that if you want to know how many hours you have put on over a period of time, the meter is fine but if you are looking at a boat with an hour meter like the type I mentioned, there is no way to know if the ready has any validity. It is easy to disconnect the signal or even easier, install a new gauge the starts the count from zero.