msgbox returns a figure object. It would be possible to find the handle of the text string and update the String property of it. If you are doing a lot of updating then that would probably be best.
However, the easier way is to provide a title when you create the msgbox, and then each time you want to update the count, call msgbox again making sure that you provide the same title. The code will reuse the figure instead of creating a new figure in this case. It still involves more overhead than would be the case for updating the String property of the appropriate object, but it is easier to program.