Let $A$ be a set that is countable. Let there be a function mapping $A$ onto a set $B$. Is $B$ countable? Let $A$ be a set that is countable. Let there be a function mapping $A$ onto a set $B$. I'm asked to prove the statement "$B$ is countable". 
This is my attempt at a solution. 
Since $A$ is countable it is either finite or countable infinite. 
If it is finite the statement is obvious. If it is countably infinite, it is by definition in one-to-one correspondence with the set $N$ consisting of positive integers. Since there exists a function mapping $A$ onto $B$, every element in $B$ has a direct relation to atleast one element in $A$, which in turn has a relation to $N$. And thus it $B$ must be countable since by proxy it is in one-to-one correspondence with $N$.
Does this logic prove anything, am I missing something? Am I completely on the wrong track and if so, how would I go about proving it? What happens in extreme cases if every element in $B$ is the image of a lot of elements in $A$?
 A: I'm afraid this doesn't analyse your proof. But here's how I'd approach proving the result. I'm using countable to mean either finite or countably infinite.
First we note that:


*

*$f$ is a function, so no element of $A$ maps to more than one element of $B$.

*$f$ is onto, so at least one element of $A$ maps to each element of $B$.


Whenever more than one element of $A$ maps to an element of $B$, let's just delete all but one of the mappings to that element, so only one element of $A$ maps to it. Now there are only one-to-one mappings.
Each deleted mapping leaves an element of $A$ unmapped, but every element of $B$ is mapped to.
So we've created a bijection between a subset of $A$ and the whole of $B$. But $A$ is countable, and any subset of a countable set is countable, so $B$ is in bijection with a countable set.
Therefore $B$ is countable.

Edit: This is almost the same argument as yours, and the answer to your last sentence is: just delete the extra mappings so everything's one-to-one, then look at what's left.
A: How the proof proceeds depends on how you define "countable". A nonempty set $S$ is countable if either:
1) there exists a one-to-one function $f : S \to \mathbb N$, or
2) there exists an onto function $g : \mathbb N \to S$.
It turns out these are equivalent, so go with the second.
Since $A$ is countable there exists an onto function $g : \mathbb N \to A$, and by hypothesis there is an onto function $h : A \to B$. The composition $h \circ g : \mathbb N \to B$ is onto, so that $B$ is countable.
A: Yes.
Anytime you have a surjection from $A$ to $B$, it follows that $\mid A\mid\ge\mid B\mid$.
Intuitively this follows easily from the definition of function, since each element of the domain corresponds to exactly one element of the codomain. 
Thus it would be easy to come up with a bijection between some, possibly proper, subset of $A$ and $B$, using Schröder-Bernstein, say, since you could get injections going both ways.
A: It is true is that if $A$ is countable, $f:A \rightarrow B$, then $Im(f) \subset B$ is countable. And since you consider only surjective functions, $B$ is countable.
For a proof, it will depend on your definition of countable. For this problem the one that I find the most suited is:
A set $A$ is countable if and only if there exist a surjection from $\mathbb{N}$ to $A$.
With it the proof is pretty straight-forward. Since by hypothesis $A$ is countable there exists a surjection $j$ from $\mathbb{N}$ to $A$. Always by definition, $f$ is surjective onto its image. So $f \circ j$ gives you a surjection from $\mathbb{N}$ to $Im(f)$ which means that $Im(f)$ is countable.
For your proof, there is a mistake in it in the end. You argue that you can have a one to one correspondence by "inverting" $f$ and composing it with the bijection from $A$ to $\mathbb{N}$, but you forgot the case where the image of $f$ is finite. It does not affect the conclusion since a finite set is countable but it is a point to consider in your proof.
