Implement a function count_substring that counts the number of substrings that begin with character "A" and ends with character "X".
For example, given the input string "CAXAAYXZA", there are four substrings that begin with "A" and ends with "X", namely: "AX", "AXAAYX", "AAYX", and "AYX".
countSubstring("CAXAAYXZA") ➞ 4
countSubstring("AAXOXXA") ➞ 6
countSubstring("AXAXAXAXAX") ➞ 15