counter examples and proof by contradiction are not the same thing.
You can make an conjecture and use a counter example to show it is false.
conjecture
Two odd whole numbers add to give an odd whole number
counter example 5 + 3 = 8 which is even.
This does not prove that Two odd whole numbers add to give an even whole number for all whole numbers
showing ~B=>~A to prove A=>B is not a proof by contradiction and is often a more complicated proof.
A n, m are two odd whole numbers or two even whole numbers
B n+m is even
~A n, m are two whole numbers one or which is even
~B n+m is odd
n + m is odd
therefore n+m=2p+1 for some whole number p
therefore n=2p-m+1
m is either odd or even
m odd m=2q+1 for some whole number q
since n>0 and m>0 then n+m>m therefore 2p+1>2q+1 therefore p>q therefore p-q>0
n=2p-2q-1+1 = 2(p-q) therefore n is even
m even m=2q for some whole number q
n=2p-2q+1 = 2(p-q)+1 n is odd
so if m is odd n is even and if m is even n is odd and by symmetry
if n is odd m is even and if n is even m is odd.
hence ~B=>~A and so A=>B not a contradiction in sight
Proof by contradiction means
to prove A=>B start with the opposite conjecture A=>~B and arrive at a contradition
A n, m are two odd whole numbers
B n+m is even
~B n+m is odd
Assume A=> ~B
m is odd therefore m=2p+1
n is odd therefore n=2q+1
n+m is odd therefore n+m = 2r+1
then 2p+1 + 2q +1 = 2r+1
if and only if 2(p+q)+1 = 2r
if and only if 2(p+q-r)=1
if and only if p+q+r=1/2 contradicting p,q,r are whole numbers
and so our assumption is wrong and A=>B
Of course in this case the best way is to prove A=>B directly
Where you might be getting confused about counter example and proof by contradiction is the \sqrt{2} is irrational proof.
A n is a positive whole number
B \sqrt{n} is rational
you disprove A=>B using a counter example by showing \sqrt{2} is irrational
you show \sqrt{2} is irrational by using proof by contradition
start with the opposite assumption that \sqrt{2} is rational and arrive at a contradiction.
http://zimmer.csufresno.edu/~larryc/proofs/proofs.contradict.html is worth a look