Set of intervals on the real line

I'm not sure how to approach this proof? any ideas

Let $A$ be a set of intervals of the real line any two of which are disjoint - in other words, if $(a,b)$ and $(x,y)$ are distinct elements of $A$ then $(a,b)\cap(x,y)=\emptyset$. Prove that A is countable. *(Use the fact that $\mathbb Q$ is countable)

-
How many intervals in $A$ can contain the given rational number? – Levon Haykazyan Mar 22 '12 at 14:58
Hint: You can assign to each $(a,b) \in A$ an element $q_{(a,b)} \in (a,b) \cap \mathbb Q$. This gives a map $f:A \to \mathbb Q$. What can you say about $f$? – martini Mar 22 '12 at 14:59
@martini the function f is surjective? i still don't understand what you mean by q(a,b)∈(a,b)∩Q. Thanks – Jenn Mar 22 '12 at 15:09
No, $f$ is never surjective. By $q_{(a,b)} \in (a,b) \cap \mathbb Q$ I mean the following: $(a,b) \subseteq \mathbb R$ is a non-empty intervall, so there is a rational number $q_{(a,b)}$ with $a < q_{(a,b)} < b$, i. e. it is contained in the intersection of $(a,b)$ with $\mathbb Q$, so $q_{(a,b)} \in (a,b) \cap \mathbb Q$ (if the index to $q$ is confusing you, for different intervalls there will be different rational numbers [as your intervalls are disjoint]. $f$ is now defined by $f\bigl((a,b)\bigr) := q_{(a,b)}$. – martini Mar 22 '12 at 15:13

Since $\mathbb{Q}$ is dense in $\mathbb{R}$ each interval contains some positive number of rational numbers. For each interval $I_{k}$ choose such a rational number $a_k \in I_k$, and denote the set of all such $a_k$ as $N$. This set is clearly countable, as it is a subset of the rational numbers, and thus $N$ is of an equal or smaller cardinality. Note that $N$ is one to one with $A$, and thus has equal size. $A$ is therefore countable.