Unless I'm mistaken, I can't seem to find a parameter in the tv_BrushRestore command for the TOTAL number of FRAMES in an ANIMBRUSH. The Position parameter tells which of the ANIMBRUSH frames is currently selected but the TOTAL FRAMES parameter seems to be missing.
Instead, a separate command, tv_BrushInfo, must be used to obtain the TOTAL FRAMES count in the ANIMBRUSH.
Maybe it would make good sense to be able to obtain TOTAL FRAMES from the tv_BrushRestore parameters as well?