How is the set of functions from ${\{a,b\}}$ to $N$ countable?
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)$