Counter doesn't work when used against a Ghost type Pokémon, as Ghost types are immune to Fighting type moves. However Counter does work against Dark type Pokémon.
>Counter counters all physical moves for twice the damage done to the user. Counter no longer counters a move that hits a substitute. Furthermore, Ghost-type Pokémon are now immune to Counter.
Mirror Coat on the other hand doesn't work when used against a Dark type Pokémon, as Dark types are immune to Psychic type moves. However Mirror Coat does work against Ghost type Pokémon.
>Dark-type Pokémon are immune to Mirror Coat, but otherwise, Mirror Coat's type has no effect on the damage done to the target.
That makes Sableye and Spiritomb the only two Pokémon immune to both Counter and Mirror Coat, being Dark/Ghost types respectively.