This example displays the count of the graphic objects in a document.
TextGraphics graphics = document.getTextGraphics(); System.out.println(graphics.getCount());
Related information
Count property