Hi Umberto,
It's great to hear that you are planning a trip to Ireland in July.
For information on where to stay, I would recommend that you check out this
accommodation page.
Both
Galway and
Cork have lots to see and do and the linked pages should help you when making your itinerary.
How long you wish to stay in Galway and Cork is really up to you. They are the two largest counties in Ireland so it's easy to spend several days exploring both. You could always spend some time exploring the
Wild Atlantic Way during this trip, too.
If you have any other questions, feel free to let us know.
Regards,
Eoin