Improved gatecount mode