Please read the following table in HTML format from a webpage and then answer the question in detail according to the table. Each table cell is defined by a <td> and a </td> tag. Each table row starts with a <tr> and ends with a </tr> tag. 'rowspan=m' and 'colspan=n' represents a cell spaning over 'm' rows and 'n' columns.

Webpage title:
Glenn Whelan
Table title:
Club
Table:
<table id='hittask' contenteditable='False'>
<tr> <th colspan=1 rowspan=2 > Club </th><th colspan=1 rowspan=2 > Season </th><th colspan=3 rowspan=1 > League </th><th colspan=2 rowspan=1 > FA Cup </th><th colspan=2 rowspan=1 > League Cup </th><th colspan=2 rowspan=1 > Other </th><th colspan=2 rowspan=1 > Total </th></tr>
<tr> <th colspan=1 rowspan=1 > Division </th><th colspan=1 rowspan=1 > Apps </th><th colspan=1 rowspan=1 > Goals </th><th colspan=1 rowspan=1 > Apps </th><th colspan=1 rowspan=1 > Goals </th><th colspan=1 rowspan=1 > Apps </th><th colspan=1 rowspan=1 > Goals </th><th colspan=1 rowspan=1 > Apps </th><th colspan=1 rowspan=1 > Goals </th><th colspan=1 rowspan=1 > Apps </th><th colspan=1 rowspan=1 > Goals </th></tr>
<tr> <td colspan=1 rowspan=4 > Manchester City </td><td colspan=1 rowspan=1 > 2001–02 </td><td colspan=1 rowspan=1 > First Division </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2002–03 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2003–04 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <th colspan=2 rowspan=1 > Total </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 0 </th></tr>
<tr> <td colspan=1 rowspan=1 > Bury (loan) </td><td colspan=1 rowspan=1 > 2003–04 </td><td colspan=1 rowspan=1 > Third Division </td><td colspan=1 rowspan=1 > 13 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 15 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=5 > Sheffield Wednesday </td><td colspan=1 rowspan=1 > 2004–05 </td><td colspan=1 rowspan=1 > League One </td><td colspan=1 rowspan=1 > 36 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 3 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 42 </td><td colspan=1 rowspan=1 > 4 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2005–06 </td><td colspan=1 rowspan=1 > Championship </td><td colspan=1 rowspan=1 > 43 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 46 </td><td colspan=1 rowspan=1 > 1 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2006–07 </td><td colspan=1 rowspan=1 > Championship </td><td colspan=1 rowspan=1 > 38 </td><td colspan=1 rowspan=1 > 7 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 41 </td><td colspan=1 rowspan=1 > 8 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2007–08 </td><td colspan=1 rowspan=1 > Championship </td><td colspan=1 rowspan=1 > 25 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 3 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 30 </td><td colspan=1 rowspan=1 > 3 </td></tr>
<tr> <th colspan=2 rowspan=1 > Total </th><th colspan=1 rowspan=1 > 142 </th><th colspan=1 rowspan=1 > 12 </th><th colspan=1 rowspan=1 > 6 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 8 </th><th colspan=1 rowspan=1 > 2 </th><th colspan=1 rowspan=1 > 3 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 159 </th><th colspan=1 rowspan=1 > 16 </th></tr>
<tr> <td class="highlighted"  colspan=1 rowspan=11 > Stoke City </td><td colspan=1 rowspan=1 > 2007–08 </td><td colspan=1 rowspan=1 > Championship </td><td colspan=1 rowspan=1 > 14 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 14 </td><td colspan=1 rowspan=1 > 1 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2008–09 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 26 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 4 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 31 </td><td colspan=1 rowspan=1 > 3 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2009–10 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 33 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 4 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 38 </td><td colspan=1 rowspan=1 > 2 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2010–11 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 29 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 7 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 3 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 39 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2011–12 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 30 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 4 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 7 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 43 </td><td colspan=1 rowspan=1 > 2 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2012–13 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 32 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 34 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2013–14 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 32 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 3 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 36 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2014–15 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 28 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 30 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2015–16 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 37 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 4 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 42 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2016–17 </td><td colspan=1 rowspan=1 > Premier League </td><td colspan=1 rowspan=1 > 30 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 31 </td><td colspan=1 rowspan=1 > 0 </td></tr>
<tr> <th colspan=2 rowspan=1 > Total </th><th colspan=1 rowspan=1 > 291 </th><th colspan=1 rowspan=1 > 5 </th><th colspan=1 rowspan=1 > 22 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 18 </th><th colspan=1 rowspan=1 > 2 </th><th colspan=1 rowspan=1 > 7 </th><th colspan=1 rowspan=1 > 1 </th><th class="highlighted"  colspan=1 rowspan=1 > 338 </th><th colspan=1 rowspan=1 > 8 </th></tr>
<tr> <td class="highlighted"  colspan=1 rowspan=3 > Aston Villa </td><td class="highlighted"  colspan=1 rowspan=1 > 2017–18 </td><td colspan=1 rowspan=1 > Championship </td><td colspan=1 rowspan=1 > 33 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 35 </td><td colspan=1 rowspan=1 > 1 </td></tr>
<tr> <td colspan=1 rowspan=1 > 2018–19 </td><td colspan=1 rowspan=1 > Championship </td><td colspan=1 rowspan=1 > 24 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > 0 </td><td colspan=2 rowspan=1 > — </td><td colspan=1 rowspan=1 > 26 </td><td colspan=1 rowspan=1 > 1 </td></tr>
<tr> <th colspan=2 rowspan=1 > Total </th><th colspan=1 rowspan=1 > 57 </th><th colspan=1 rowspan=1 > 2 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 2 </th><th colspan=1 rowspan=1 > 0 </th><th colspan=1 rowspan=1 > 61 </th><th colspan=1 rowspan=1 > 2 </th></tr>
<tr> <th colspan=3 rowspan=1 > Career total </th><th colspan=1 rowspan=1 > 503 </th><th colspan=1 rowspan=1 > 19 </th><th colspan=1 rowspan=1 > 30 </th><th colspan=1 rowspan=1 > 1 </th><th colspan=1 rowspan=1 > 27 </th><th colspan=1 rowspan=1 > 4 </th><th colspan=1 rowspan=1 > 14 </th><th colspan=1 rowspan=1 > 2 </th><th colspan=1 rowspan=1 > 573 </th><th colspan=1 rowspan=1 > 26 </th></tr>
</table>
Question:
How any appearances did Whelan make for Stoke before leaving in 2017?
Answer:
Whelan made 338 appearances for Stoke before joining Aston Villa in 2017.