"Please give us five glasses."
As a measure word, 杯 is use for what goes in the cup/ glass (the drink), not for the container itself. You wouldn't say "5 glasses of glasses", but you could say "5 boxes of glasses". Even though boxes isn't the same as 个, I think you can see the similarity. And as others have said here 杯 is part of the word 杯子 - the object being "measured".