Can a $0$-dimensional analytic subset of a compact complex variety has infinite many points? Let $X$ be a compact complex variety and $A$ the $0$-dimensional  analytic subset of $X$.

Question: Can $A$ has infinite many points?

Clues: By the definition of complex spaces and analytic subsets, we can only consider the $0$-dimensional  analytic subset of a local model of $X$, since finite many local models can cover $X$. The local model of $X$ may be  $\mathbb{C}^n$ or a  domain in $\mathbb{C}^n$. However $\mathbb{C}^n$ or a  domain in $\mathbb{C}^n$ may contains a $0$-dimensional  analytic subset containing infinite many points. e.g., $\mathbb{P}^1=\mathbb{C}^1\cup\{\infty\}$.
Definition: A complex analytic set  in $X$ is a set which can be defined locally by finitely many holomorphic equations.
 A: Yes, $A$ could be infinite. For example, let $X = \mathbb P^1 = \mathbb C \cup \{\infty\}$ and consider
$$A=\{1, 2, \cdots, n, \cdots\}.$$
Then for all $n\in A$, let $U_n = B(n, 1)$ and $f_n = z-n$. Then $A\cap U_n = \{ n\} = f_n^{-1} (0)$.
Remark Following Huybrechts, he defines (1) an analytic subset $A$ of an open subset $U$ in $\mathbb C^n$, and (2) an analytic subvariety of a complex manifold $X$. When $X = U$, both definition agrees. Hence I cited only the latter one.
Definition Let $X$ be a complex manifold. A closed subset $Y$ of $X$ is called an analytic subvariety if for each $y\in Y$, there is an open neighborhood $U$ of $y$ so that $Y\cap U$ is the zero set of finitely many holomorphic functions $f_1, \cdots, f_k \in \mathscr O(U)$.
The closedness assumption is essential here. $A$ constructed above is not is closed in $\mathbb P^1$.
If we further assume that $A$ is closed, then $A$ is indeed finite: let $a\in A$. Then there is an open neighborhood $U$ so that $A\cap U$ is the zero set of $f_1, \cdots, f_k$. Now take a smaller neighborhood $V$ of $x$ compactly contained in $U$. Then $A\cap V$ must be finite (if not, it has a limit point, then $f_i$ must be zero functions, which contradicts that $A$ has dimension zero).
Thus, by choosing an even smaller $W$, we have $A\cap W = \{a\}$. Thus $A$ is an discrete set in $X$. Since $X$ is compact, $A$ is finite.
