Spain is divided in 17 parts called autonomous communities .
In total , 17 autonomous communities and 2 autonomous cities were created :