You can kind of counter it to some extent but at the end of the day you're just hoping that the ball that rolls on the ground goes wide of the stumps or the one that hits the crack moves so much that it misses your edge completely.
You can try and play your shots but it's just a matter of time before you lose your wicket looking like a tailender who missed the ball by three feet, other option is to go at the other extreme and sit there on the back foot trying to play the ball as late as possible and nudge it here and there until you see a wide ball that you can cut hard.
It's the inconsistency that is the problem more than extravagant movement or bounce. If you know a pitch is going to turn square, you can come up with a strategy to counter it like the Aussies did early on in their tour of India.
If you know it bounces more, you can practice and prepare for it.
If three balls that land in virtually the same spot behave in three vastly different ways, there's not much any batsman can do except pray that it misses the stumps and doesn't catch the edge.