vnc: return the number of rectangles