To perform a Counter Attack, attack an enemy while the enemy is performing, or recovering from an attack. Counter attacks deal extra damage.
It doesn't matter if your attack interrupts the enemy's attack or not, you will still deal the counter damage.
Certain effecst boost counter damage such as Old Leo Ring.
Ripostes and backstabs are not counter attacks: they have their own damage calculations and are not boosted by effects that boost counter damage.