Simple solution is using the below xpath.
//*[@id='emailwrapper']/div/div/table
Your code should be
lastTable = len(driver.find_elements_by_xpath("//*[@id='emailwrapper']/div/div/table"))-1
print lastTable
Simple solution is using the below xpath.
//*[@id='emailwrapper']/div/div/table
Your code should be
lastTable = len(driver.find_elements_by_xpath("//*[@id='emailwrapper']/div/div/table"))-1
print lastTable