What's the most intuitive way to calculate the time and space complexity (Big O notation) of the following recursive function?
function count(str) {
  if (str.length <= 1) {
    return 1;
  }
  var firstTwoDigits = parseInt(str.slice(0, 2), 10);
  if (firstTwoDigits <= 26) {
    return count(str.slice(1)) +
           count(str.slice(2));
  }
  return count(str.slice(1));
}
 
    