How Many Parrots?

Nothing gives more pleasure than to see birds chirping away merrily in the trees. Birds should be seen sitting in the trees, and nowhere else; at least not in cages! But, I must confess that few years ago I was cruel. I liked to keep birds at home, and had kept a number of parrots in cages. Before I proceed with the riddle, I must tell you that I have set all the birds free now, and have sold the cages to a scrap dealer.
Well, back to my dilemma. I did not have the same number of cages as the parrots. If I had tried to keep one parrot in each cage, then there would be one bird without a cage. On the other hand, if I had tried to put two parrots in each cage, then I would be left with one empty cage. So, can you tell me how many parrots and how many cages I had?