You are counting only the words that have been accepted in the RAE dictionary. A word is only accepted when there is a noticeable usage. So there is a lot of words that have not reached the category of “word” officially, but they exist.
Apart from that, the dictionary only list root words, not derivatives.
Apart from that, the dictionary only list root words, not derivatives.