Counting congruences between modular forms in Atkin-Lehner eigenspaces