Ideals of $C(X)$ with only finitely many number of zerosets We denote the rings of all real valued continuous functions on compeletely regular Hausdorff space $X$ by $C(X)$.Let $I$ be a ring ideal of $C(X)$. define $$Z[I]:=\lbrace Z(f):\;f\in I\rbrace$$ where  $Z(f):=\lbrace x \in X:\;f(x)=0\rbrace$. We are interested in knowing about the relation  about algebraic properties of the ring $C(X)$ and topological properties of the space $X$. I have a question about the relation between the number of zero sets of $I$ in the finite case and it's relation with the topological space $X$. Let me pose my questions in the definite way.
Question1:  for which positive integer $n$ we can have a ring ideal $I$,  that $Z(I)$ contains only n elements?
Question2: If we have an ideal $I$, such that $|Z(I)|=n$ for some positive integer $n$, can we characterize the ideal $I$?
Question3: for which condition on the space $X$, we have an ideal $I$, with $|Z(I)|=n$, for some positive integer $n$? 
 A: Edit: In the first version I had the additional assumption that each singleton in $X$ is a zero set. But as observed by AliReza Olfati the proof can be adapted to work in the general case. Therefore we have: 

$Z(I)$ is finite if and only if the following holds: 
  
  
*
  
*There is $A \subseteq X$ closed and $x_1,...,x_m \in X\setminus A$ with $X=A\cup  \lbrace x_1,...,x_m\rbrace$.
  
*$Z(I) = \lbrace A \cup T \mid T \subseteq \lbrace x_1,...,x_m\rbrace\;\rbrace$. In particular $|Z(I)|=2^m$ is a power of $2$.
  
*$I=(1-\delta_{A \cup T} \mid T \subseteq \lbrace x_1,...,x_m\rbrace)$ 
  

Proof: $(\Rightarrow)$ Let $Z(I) = \lbrace Z(f_1),...,Z(f_n)\rbrace$. 
First note that $Z(f^2 + g^2) = Z(f) \cap Z(g)$. Hence $Z(I)$ is closed under $\cap$ and we have $$A := Z(f_1) \cap ... \cap Z(f_n) \in Z(I).$$
Let $A=Z(f_0)$.  
Next let's show that $X \setminus A$ is finite. Suppose $X \setminus A$ is infinite. Since $X$ is Hausdorff and $A$ is closed, then there is a sequence of closed subsets $A \cup \lbrace x_1,...,x_k\rbrace$. Hence it's enough to show that there are only finitely many closed subsets $C \supseteq A$ in $X$. Since $X$ is completely regular, such a $C$ is the intersection of zero sets (Gillman-Jerison: Rings of continuous functions, Theorem 3.2). Thus we have a surjection 
$$\lbrace Z \subseteq X \mid Z \supseteq A \text{ zero set }\;\rbrace\to \lbrace C \subseteq X \mid  C \supseteq A \text{ closed }\rbrace,\; \mathfrak{Z} \mapsto \bigcap_{Z \in \mathfrak{Z}}Z.$$
Let $Z=Z(h) \supseteq A$ be a zero set. Then $f_0h \in I$ with $Z(f_0h)=Z(f_0) \cup Z(h) = Z$, i.e. $Z \in Z(I)$. Hence the LHS of the map is just the finite set $Z(I)$ and consequently its image is also finite. Hence the finiteness of $X \setminus A$ and 1) are  shown. 
Let $X \setminus A = \lbrace x_1,...,x_m\rbrace$. Since $A$ is closed and $X$ is Hausdorff it follows that $A$, $\lbrace x_i\rbrace$ are both, open and closed. Hence a function $f: X \to \mathbb R$ is continuous iff $f|A$ is continuous. In particular we find continuous $h$ with $Z(h)=\lbrace x_i\rbrace$. 
To see 2) let $f \in I$. By definition $A \subseteq Z(f)$. Thus $T := Z(f) \setminus A \subseteq \lbrace x_1,...,x_m\rbrace$ and $Z(f)=A \cup T$ is in the RHS.  Conversely, if   $T = \lbrace x_{p_1},...,x_{p_k}\rbrace$  then choose $h_j \in C(X)$ with $Z(h_j) = \lbrace x_{p_j}\rbrace$. Now $f := f_0h_1\cdots h_p \in I$ and $Z(f) = A \cup T \in Z(I)$. 
3) Note that the functions used in the following are continuous by the remark preceding the proof of 2). Let $f \in I$ and let $X \setminus Z(f) = \lbrace x_{p_1},...,x_{p_k}\rbrace$. Then 
$f= \sum_j f(x_{p_j})(1-\delta_{X \setminus \lbrace x_{p_j} \rbrace})$ is contained in the RHS. Conversely, let $T \subseteq \lbrace x_1,...,x_m\rbrace$ be given. By 2) there is $f \in I$ with $Z(f) = A \cup T$. Define a continuous map $h$ by $h|Z(f) = 0$, $h(x) = 1/f(x)$ if $x \notin Z(f)$. Then $1-\delta_{A \cup T} = fh \in I$. 
$(\Leftarrow)$ If $X$ is given by 1) and $I$ by 3) then $Z(I) = \lbrace A \cup T \mid T \subseteq \lbrace x_1,...,x_m\rbrace\;\rbrace$ follows easily. q.e.d. 
