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:
List of Chief Ministers of Kerala
Table title:
Chief Ministers of Kerala
Table:
<table id='hittask' contenteditable='False'>
<tr> <th colspan=1 rowspan=1 > No. </th><th colspan=1 rowspan=1 > Name Constituency Ministry </th><th colspan=1 rowspan=1 > Portrait </th><th colspan=1 rowspan=1 > Term (tenure length) </th><th colspan=1 rowspan=1 > Assembly (election) </th><th colspan=2 rowspan=1 > Party (alliance) </th></tr>
<tr> <td colspan=1 rowspan=1 > – </td><td colspan=1 rowspan=1 > Vacant (President's rule) </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 1 November 1956 – 5 April 1957 (155 days) </td><td colspan=1 rowspan=1 > Dissolved </td><td colspan=1 rowspan=1 > N/A </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 1 </td><td colspan=1 rowspan=1 > E. M. S. Namboodiripad MLA for Nileshwaram 1st EMS ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 5 April 1957 – 31 July 1959 (2 years, 117 days) </td><td colspan=1 rowspan=1 > First Assembly (1957–59) (1957 election) </td><td colspan=1 rowspan=1 > Communist Party of India </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > – </td><td colspan=1 rowspan=1 > Vacant (President's rule) </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 31 July 1959 – 22 February 1960 (206 days) </td><td colspan=1 rowspan=1 > Dissolved </td><td colspan=1 rowspan=1 > N/A </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 2 </td><td colspan=1 rowspan=1 > Pattom A. Thanu Pillai MLA for Trivandrum II Thanupillai ministry </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > 22 February 1960 – 26 September 1962 (2 years, 216 days) </td><td colspan=1 rowspan=2 > Second Assembly (1960–64) (1960 election) </td><td colspan=1 rowspan=1 > Praja Socialist Party </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 3 </td><td colspan=1 rowspan=1 > R. Sankar MLA for Cannanore I Sankar ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 26 September 1962 – 10 September 1964 (1 year, 350 days) </td><td colspan=1 rowspan=1 > Indian National Congress </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=2 > – </td><td colspan=1 rowspan=2 > Vacant (President's rule) </td><td colspan=1 rowspan=2 > - </td><td colspan=1 rowspan=1 > 10 September 1964 – 25 March 1965 (2 years, 177 days) </td><td colspan=1 rowspan=1 > Dissolved </td><td colspan=1 rowspan=2 > N/A </td><td colspan=1 rowspan=2 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 25 March 1965 – 6 March 1967 (2 years, 177 days) </td><td colspan=1 rowspan=1 > Dissolved (1965 election) </td></tr>
<tr> <td colspan=1 rowspan=1 > (1) </td><td colspan=1 rowspan=1 > E. M. S. Namboodiripad MLA for Pattambi Second E. M. S. Namboodiripad ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 6 March 1967 – 1 November 1969 (2 years, 240 days; total 4 years, 357 days) </td><td colspan=1 rowspan=2 > Third Assembly (1967–70) (1967 election) </td><td colspan=1 rowspan=1 > Communist Party of India (Marxist) (Saptakakshi Munnani) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 4 </td><td colspan=1 rowspan=1 > C. Achutha Menon MLA for Kottarakkara First C. Achutha Menon ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 1 November 1969 – 1 August 1970 (273 days) </td><td colspan=1 rowspan=1 > Communist Party of India </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > – </td><td colspan=1 rowspan=1 > Vacant (President's rule) </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 4 August – 3 October 1970 (60 days) </td><td colspan=1 rowspan=1 > Dissolved </td><td colspan=1 rowspan=1 > N/A </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (4) </td><td colspan=1 rowspan=1 > C. Achutha Menon MLA for Kodakara Second C. Achutha Menon ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 4 October 1970 – 25 March 1977 (6 years, 172 days; total 7 years, 80 days) </td><td colspan=1 rowspan=1 > Fourth Assembly (1970–77) (1970 election) </td><td colspan=1 rowspan=1 > Communist Party of India (United Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 5 </td><td class="highlighted"  colspan=1 rowspan=1 > K. Karunakaran MLA for Mala First K. Karunakaran ministry </td><td colspan=1 rowspan=1 > - </td><td class="highlighted"  colspan=1 rowspan=1 > 25 March – 25 April 1977 (31 days) </td><td colspan=1 rowspan=4 > Fifth Assembly (1977–79) (1977 election) </td><td colspan=1 rowspan=2 > Indian National Congress (United Front) </td><td colspan=1 rowspan=2 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 6 </td><td colspan=1 rowspan=1 > A. K. Antony MLA for Kazhakkuttom First A. K. Antony ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 27 April 1977 – 27 October 1978 (1 year, 183 days) </td></tr>
<tr> <td colspan=1 rowspan=1 > 7 </td><td colspan=1 rowspan=1 > P. K. Vasudevan Nair MLA for Alleppey P. K. Vasudevan Nair ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 29 October 1978 – 7 October 1979 (343 days) </td><td colspan=1 rowspan=1 > Communist Party of India (United Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 8 </td><td colspan=1 rowspan=1 > C. H. Mohammed Koya MLA for Malappuram C. H. Mohammed Koya ministry </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > 12 October – 1 December 1979 (50 days) </td><td colspan=1 rowspan=1 > Indian Union Muslim League (United Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > – </td><td colspan=1 rowspan=1 > Vacant (President's rule) </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 5 December 1979 – 25 January 1980 (51 days) </td><td colspan=1 rowspan=1 > Dissolved </td><td colspan=1 rowspan=1 > N/A </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 9 </td><td colspan=1 rowspan=1 > E. K. Nayanar MLA for Malampuzha First E. K. Nayanar ministry </td><td colspan=1 rowspan=1 > Ek nayanar.jpeg </td><td colspan=1 rowspan=1 > 25 January 1980 – 20 October 1981 (1 year, 268 days) </td><td colspan=1 rowspan=3 > Sixth Assembly (1980–82) (1980 election) </td><td colspan=1 rowspan=1 > Communist Party of India (Marxist) (Left Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > – </td><td colspan=1 rowspan=1 > Vacant (President's rule) </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 21 October – 28 December 1981 (68 days) </td><td colspan=1 rowspan=1 > N/A </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (5) </td><td class="highlighted"  colspan=1 rowspan=1 > K. Karunakaran MLA for Mala Second K. Karunakaran ministry </td><td colspan=1 rowspan=1 > - </td><td class="highlighted"  colspan=1 rowspan=1 > 28 December 1981 – 17 March 1982 (79 days) </td><td colspan=1 rowspan=1 > Indian National Congress (I) (United Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > – </td><td colspan=1 rowspan=1 > Vacant (President's rule) </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 17 March – 23 May 1982 (67 days; total 4 years, 54 days) </td><td colspan=1 rowspan=1 > Dissolved </td><td colspan=1 rowspan=1 > N/A </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (5) </td><td class="highlighted"  colspan=1 rowspan=1 > K. Karunakaran MLA for Mala Third K. Karunakaran ministry </td><td colspan=1 rowspan=1 > - </td><td class="highlighted"  colspan=1 rowspan=1 > 24 May 1982 – 25 March 1987 (4 years, 305 days) </td><td colspan=1 rowspan=1 > Seventh Assembly (1982–87) (1982 election) </td><td colspan=1 rowspan=1 > Indian National Congress (United Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (9) </td><td colspan=1 rowspan=1 > E. K. Nayanar MLA for Trikaripur Second E. K. Nayanar ministry </td><td colspan=1 rowspan=1 > Ek nayanar.jpeg </td><td colspan=1 rowspan=1 > 26 March 1987 – 17 June 1991 (4 years, 83 days) </td><td colspan=1 rowspan=1 > Eighth Assembly (1987–91) (1987 election) </td><td colspan=1 rowspan=1 > Communist Party of India (Marxist) (Left Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (5) </td><td class="highlighted"  colspan=1 rowspan=1 > K. Karunakaran MLA for Mala Fourth K. Karunakaran ministry </td><td colspan=1 rowspan=1 > - </td><td class="highlighted"  colspan=1 rowspan=1 > 24 June 1991 – 16 March 1995 (3 years, 265 days; total 8 years, 315 days) </td><td colspan=1 rowspan=2 > Ninth Assembly (1991–95) (1991 election) </td><td colspan=1 rowspan=2 > Indian National Congress (United Democratic Front) </td><td colspan=1 rowspan=2 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (6) </td><td colspan=1 rowspan=1 > A. K. Antony MLA for Thirurangadi Second A. K. Antony ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 22 March 1995 – 9 May 1996 (1 year, 48 days) </td></tr>
<tr> <td colspan=1 rowspan=1 > (9) </td><td colspan=1 rowspan=1 > E. K. Nayanar MLA for Thalassery Third E. K. Nayanar ministry </td><td colspan=1 rowspan=1 > Ek nayanar.jpeg </td><td colspan=1 rowspan=1 > 20 May 1996 – 13 May 2001 (5 years, 24 days; total 11 years, 10 days) </td><td colspan=1 rowspan=1 > Tenth Assembly (1996–2001) (1996 election) </td><td colspan=1 rowspan=1 > Communist Party of India (Marxist) (Left Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (6) </td><td colspan=1 rowspan=1 > A. K. Antony MLA for Cherthala Third A. K. Antony ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 17 May 2001 – 29 August 2004 (3 years, 75 days; total 5 years, 306 days) </td><td colspan=1 rowspan=2 > Eleventh Assembly (2001–06) (2001 election) </td><td colspan=1 rowspan=2 > Indian National Congress (United Democratic Front) </td><td colspan=1 rowspan=2 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 10 </td><td colspan=1 rowspan=1 > Oommen Chandy MLA for Puthuppally First Oommen Chandy ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 31 August 2004 – 12 May 2006 (1 year, 254 days) </td></tr>
<tr> <td colspan=1 rowspan=1 > 11 </td><td colspan=1 rowspan=1 > V. S. Achuthanandan MLA for Malampuzha V. S. Achuthanandan ministry </td><td colspan=1 rowspan=1 > V. S. Achuthanandan.JPG </td><td colspan=1 rowspan=1 > 18 May 2006 – 14 May 2011 (4 years, 361 days) </td><td colspan=1 rowspan=1 > Twelfth Assembly (2006–11) (2006 election) </td><td colspan=1 rowspan=1 > Communist Party of India (Marxist) (Left Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > (10) </td><td colspan=1 rowspan=1 > Oommen Chandy MLA for Puthuppally Second Oommen Chandy ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 18 May 2011 – 20 May 2016 (5 years, 2 days; total 6 years, 256 days) </td><td colspan=1 rowspan=1 > Thirteenth Assembly (2011–16) (2011 election) </td><td colspan=1 rowspan=1 > Indian National Congress (United Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 12 </td><td colspan=1 rowspan=1 > Pinarayi Vijayan MLA for Dharmadam Pinarayi Vijayan ministry </td><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 25 May 2016 – present (2 years, 340 days) </td><td colspan=1 rowspan=1 > Fourteenth Assembly (2016–21) (2016 election) </td><td colspan=1 rowspan=1 > Communist Party of India (Marxist) (Left Democratic Front) </td><td colspan=1 rowspan=1 >  </td></tr>
</table>
Question:
How many times did K. Karunakaran serve as the Chief Minister of Kerala, and what were the dates of each tenure?
Answer:
K. Karunakaran served as the Chief Minister of Kerala four times: for a brief period from March 1977 to April 1977, another short term from December 1981 to March 1982, followed by a brief period of president's rule from May 1982 to March 1987, and from June to March 1995.