title: Write a function to count number of Palindrome substrings in given string?
body: <p>Given a string <code>aaaabaabaaaa</code>(s to be generic), how many possible palindrome of size > 2 (n to be generic) can be generated from this string?</p>
  
  <p>I need to know how to count number of palindromes and to print those. </p>
  
  <p>Eg. for above string  aaa, aaaa, aba, aba, aaa, aaaa, abaaba, aaaabaabaaaa.</p>
  
  <p>-Question asked in SAP(hiring for java) interview</p>