If strict preferences map onto $\Bbb{N}$ what do weak preferences map onto? Suppose I have $$\text{apples} \succ \text{pears} \succ \text{pineapples}$$

I can map this onto the natural numbers as follows 

$$\text{apples}\mapsto 1$$
$$\text{pears}\mapsto 2$$
$$\text{pineapple}\mapsto 3$$

But for weak preferences we might have $$\text{apples} \sim \text{pears}$$
But this wouldn't map bijectively onto the natural numbers because then for example 
$$\text{apples} \mapsto 2$$
$$\text{pears} \mapsto 2$$

My Question: 

What do we map weak preferences on to? Or do we relax the assumption the map has to be bijective and allow it to be a surjective mapping onto $\Bbb{N}$?
First of all, I don't know if there is a convention as I never use weak preferences myself. But I can give you some suggestion that should work:

Do you have a finite number of goods, lets say $n$? Then $\mathbb{N}$ is clearly enough:
Just map the best good to 1, the second best to $n$, third best to $n^2$,... .
If you are indifferent between 2 goods (lets say they would be ranked third overall) assign them to $n^2$ and $n^2+1$. As @MettaWorldPeace already pointed out: it is kind of "wasteful" to use $\mathbb{N}$, so can we use less? And clearly we can never need more than $(n-1)^n+1$ numbers, so a mapping on $\{1,2, ..., (n-1)^n+1 \}$ would be sufficient (you can use even less numbers, but it is annoying to write down, so I just leave it at that).

What if we have a (countably) infinite number of goods? Here we can use the same trick, using $\mathbb{R}$ (or, if you like to, use $\mathbb{Q}$) just assign the best good $1$, the second best $2$, ... . If there are indifferences (i.e., you have three second best goods, the first one is assigned $2$, the second one $2.1$, the third $2.11$(or whatever you like)). Again, as before it is kind of wasteful, what else can you use? You could use a mapping on $\mathbb{N}\times \mathbb{N}$.

The same idea clearly works for every other number of goods, but I guess you can figure that out yourself.

Remark: This is not more than a different way to write preferences. You can not use this, e.g. as a utility function. However, all of these examples have the property that you can compare the ranking by simple mathematical operations (i.e., comparing $\lfloor \frac{x}{n}\rfloor$ for the first example).