Please read the following table in Markdown format and then answer the question according to the table. Table cells in one row are seperated by '|', and different rows are seperated by '
'.

Table:
| District | Incumbent | Party | First\nelected | Result | Candidates |
| --- | --- | --- | --- | --- | --- |
| Virginia 1 | Thomas Newton, Jr. | Adams-Clay Republican | 1801 | Re-elected | Thomas Newton, Jr. |
| Virginia 2 | Arthur Smith | Crawford Republican | 1821 | Retired\nJacksonian gain | James Trezvant (J) 75.7%\nRichard Eppes (DR) 24.3% |
| Virginia 3 | William S. Archer | Crawford Republican | 1820 (special) | Re-elected | William S. Archer (J) 100% |
| Virginia 4 | Mark Alexander | Crawford Republican | 1819 | Re-elected | Mark Alexander (J) |
| Virginia 5 | John Randolph | Crawford Republican | 1799\n1819 | Re-elected | John Randolph (J) 100% |
| Virginia 6 | George Tucker | Crawford Republican | 1819 | Retired\nJacksonian gain | Thomas Davenport (J) 53.9%\nJames Lanier 22.6%\nBarzillai Graves 16.3%\nJohn D. Urquhart 7.2% |
| Virginia 7 | Jabez Leftwich | Crawford Republican | 1821 | Lost re-election\nJacksonian gain | Nathaniel H. Claiborne (J) 51.4%\nJabez Leftwich (C-DR) 48.6% |
| Virginia 8 | Burwell Bassett | Crawford Republican | 1805\n1821 | Re-elected | Burwell Bassett (J) 95.3%\nServant Jones (DR) 4.5%\nReuben Washer 0.2% |
| Virginia 9 | Andrew Stevenson | Crawford Republican | 1821 | Re-elected | Andrew Stevenson (J) 100% |
| Virginia 10 | William C. Rives | Crawford Republican | 1823 | Re-elected | William C. Rives (J) 100% |
| Virginia 11 | Philip P. Barbour | Crawford Republican | 1814 (special) | Retired\nAdams gain | Robert Taylor (A) 100% |
| Virginia 12 | Robert S. Garnett | Crawford Republican | 1817 | Re-elected | Robert S. Garnett (J) 68.5%\nJohn H. Upshaw 31.5% |
| Virginia 13 | John Taliaferro | Crawford Republican | 1824 (special) | Re-elected | John Taliaferro (A) 63.3%\nJohn Hooe (F) 26.7% |
| Virginia 14 | Charles F. Mercer | Crawford Republican | 1817 | Re-elected | Charles F. Mercer (A) |
| Virginia 15 | John S. Barbour | Crawford Republican | 1823 | Re-elected | John S. Barbour (J) 53.7%\nThomas Marshall (F) 46.3% |
| Virginia 16 | James Stephenson | Federalist | 1821 | Retired\nAdams gain | William Armstrong (A) 57.1%\nEdward Colston (F) 42.9% |
| Virginia 17 | Jared Williams | Crawford Republican | 1819 | Retired\nAdams gain | Alfred H. Powell (A) 42.0%\nWilliam Steenergen (DR) 21.5%\nAugustine C. Smith (DR) 20.3%\nSamuel Kercheval (DR) 13.6%\nRobert Allen (DR) 2.6% |
| Virginia 18 | Joseph Johnson | Jackson Republican | 1823 | Re-elected | Joseph Johnson (J) 62.0%\nPhillip Doddridge (F) 38.0% |
| Virginia 19 | William McCoy | Crawford Republican | 1811 | Re-elected | William McCoy (J) 70.2%\nDaniel Sheffey (F) 29.8% |
| Virginia 20 | John Floyd | Crawford Republican | 1817 | Re-elected | John Floyd (J) 84.7%\nAllen Taylor (F) 15.3% |
| Virginia 21 | William Smith | Crawford Republican | 1821 | Re-elected | William Smith (J) 55.2%\nJames Lovell (DR) 44.8% |
| Virginia 22 | Alexander Smyth | Crawford Republican | 1817 | Retired\nAdams gain | Benjamin Estil (A) 58.9%\nJoseph Crockett (DR) 32.0%\nWilliam Graham (DR) 9.1% |
Question:
number of incumbents who retired or lost re-election
Answer:
7