r1502 + introduce getObjectCount() and try using it