Would those moves fail since it is the substitute who takes the damgage? Or if they do work, what would be the damage on the defending Pokemon, would it be the same as if there were no substitute or would it be different?
Gen I: > An attack absorbed by a substitute can be countered for the amount of damage it would have done to the user had the user not had a substitute.
Gen II-V: > Counter no longer counters a move that hits a substitute.
This applies to all 3. Source: http://bulbapedia.bulbagarden.net/wiki/Counter_(move)