How is the set of functions from ${\{a,b\}}$ to $N$ countable? Assume a set of functions from ${\{a,b\}}$ to $N$ 

Where $N$ is the set of Natural numbers.

Let us assume that the size of $N$ is $n$.
i.e $|N|=n$

The first element $a$ have $n$ choices for mapping.
The second element $b$ have $n$ choices for mapping as well.

So the number of functions = $n.n$ = $n^2$.
which  is strictly greater than $n$ and hence the size of $N$.
So "Set of functions from ${\{a,b\}}$ to $N$", should not be countable. But it is. I am just a beginner in discrete maths, so this might be a stupid question for some. But please explain.
You are confusing countable and finite. A finite set is always countable, however a countable set can be infinite. 

You only need to find an injection from your set and $\mathbb{N}$, it means that you can identify each element of your set using a natural number (a code if you prefer). For instance you can code the set of functions from $\{a,b\}$ to $\mathbb{N}$ using the injection $\alpha$ below:  

$\alpha : \mathbb{N}^{\{a, b\}} \rightarrow \mathbb{N} : f \mapsto 2^{f(a)}(2f(b)+1)$