flipped row counting