implementing retained obj counts