Added count-pivot mode.