counting plateaus