add optimized counting2s