However, some people consider "the number of students in Harvard University" as continuous rather than discrete, because the number of students in Harvard changes per year or per term. Are they correct?
The fact that "the number of students in Harvard University" has a changing (i.e., varying) value means that it's a variable—not that it is continuous. Both discrete and continuous variables generally do have changing values—and a discrete variable can vary continuously with time.
I am quite aware that discrete variables are those values that you can count while continuous variables are those that you can measure such as weight or height.
Especially in mathematics, it is important that you develop a habit of referring to the definitions presented in your text, which generally are not supplementary, side notes, because important results are derived from their details and because definitions are allowed to conflict across different texts. Notice that your two simplified definitions already answers your own question. Trust them.
How do I determine whether a statement or variable is discrete or continuous?
Sense-making is another critical habit in mathematics: what does it even mean for a statement to be discrete/continuous?
Orthogonal note on data types in descriptive statistics:
- nominal & ordinal - the data labels are categorical (and possibly numeric), and so assume values from a discrete set of categories
- interval & ratio - the data labels are quantitative (and always numeric), measured on a scale that is either discrete or continuous
(An example of ordinal data is Airbnb accommodation ratings;
an example of discrete interval data is Celsius temperature values recorded to the nearest integer;
an example of discrete ratio data is the number of mosquitoes in a box.)