From typicallyspanish.com

National
Four million legal foreigners now resident in Spain
By h.b.
May 9, 2008 - 7:35 AM

The number of foreigners with residency permits in Spain has crossed the four million number for the first time ever.
Cataluña, Madrid, the Valencia region and Andalucía are home to 65% of the legal foreigners, with the Moroccans the most numerous, but the Romanians the group to increase the fastest.

The latest numbers from the National Statistics Institute say that at the end of March there were 4,192,835 foreigners with legal residence in Spain.

40% of the foreigners are EU nationals, 30% come from Latin America, 20% come from Africa and 6% from Asia. There are 2.2 million men against 1.9 million women.

The top ten immigrant nationalities in Spain:
1. Moroccans - 675.906
2. Romanians - 664.880
3. Ecuadorians - 413.642
4. Colombians - 264.549
5. British - 206.168
6. Bulgarians - 136.504
7. Italians - 130.905
8. Chinese - 126.057
9. Peruvians - 123.161
10. Portuguese - 109.576