How many states does Spain have?

Spain does not have states but they do have autonomas comunidades. Which are basically states there are 17 autonomas comunidades