More efficient counter checking.