This example displays the count of the chart objects of the active sheet.
System.out.println(sheet.getChartObjects().getCount());
Related information
Count property