Question d’entretien chez Brooksource

Write a function that counts palindromes within a string, counting single character substrings as palindromes.