How many four-digit palindromes $a b b a$ have the property that the two-digit integer $a b$ and the two-digit integer $b a$ are both prime numbers? (For example, 2332 does not have this property, since 23 is prime but 32 is not.)
If $a b$ and $b a$ are both prime numbers, then neither is even which means that neither digit $a$ or $b$ is even and neither equals 5 , otherwise $a b$ or $b a$ would be even or divisible by 5 and so not prime.

Therefore, each of $a$ and $b$ equals $1,3,7$, or 9 .

The two-digit primes using these digits are 11,13,17, 19,31,37,71,73,79, 97 .

If $a b$ equals one of these primes, then $b a$ must be prime as well, which eliminates 19 as a possible value for $a b$, since 91 is not prime.

Therefore, abba could be 1111, 1331, 1771, 3113, 3773, 7117, 7337, 7997, 9779.

There are 9 such palindromes.

ANSWER: 9