No, those who have left the UK without finishing their studies are not taken into account. Besides, the Home Office does not count the following groups of students:
Those who have switched to another visa category;
Those on sabbatical leave who are currently outside the UK;
Those who have transferred to another educational institution.