We know a function f : A --> B is onto function iff :
Range(A) = Co domain [Co domain is nothing but set B possible values]
Now for a given value of A , we will have unique and hence one value of B..
So say if we have 10 unique values of A , we will have at most 10 values of B [If we have 10 values then it would be a bijection as in that case function will be one one and onto is given in the question]
In short , as the function f : A --> B is onto , hence
No of values in set B <= No of set A [ Equality holds when the function is one - one also]
As the set A is given to be countable , so anything less than countable is countable as well..
Hence set B is also countable..