Hi Felippe,
GCM requires that you register each app install with GCM and then store the list of 'registration ids' you are issued on your own server (or using a hosted GCM server platform like AirBop -
http://www.airbop.com). When you are ready to send a message to all those app installs, your server would then format and send a message to GCM specifying which 'registration ids' should receive the message. That is done in 1000 id batches, but yes you can send to millions of id's this way.
We've been getting this sort of question a lot lately, so we put together an article with some nice diagrams to help illustrate the process:
http://support.airbop.com/kb/faq/how-does-google-cloud-messaging-workHopefully that helps! Let me know if you need any more clarification.
Best,
Colin