Let $h : X \times I \rightarrow \mathbb{R}$ be a continuous function, where $X$ is a compact set of $\mathbb{R}^k$, for some $k$.
Set $\hat{h}(x,t) = 1$ if $h(x,t) \neq 0$, $0$ otherwise.
Define $g : I \rightarrow \mathbb{R}$ by $g(t) = \int_X \hat{h}(x,t) d\mu$, where $\mu$ is Lebesgue measure on $X$.
Under what conditions can we assert that $g$ is continuous?
Leo, thank you for your effort in helping me find a solution. I think you missed part of the problem, though. The function $h$ definitely depends on both variables: $h(x,t)$. My question pertains to $\hat{h}$; not to $h$. $\hat{h}$ is defined in terms of $h$ as: $\hat{h}(x,t) = 1$ if $h(x,t) \neq 0$, $0$ otherwise.
If it helps clarity, fix $t$ at any value and set
$ A_t = \{x \in X \mid h(x, t) \neq 0\} $.
Then an alternate definition of $g$ is, $g(t) = \mu(A_t)$.
The question then is, "Is $g$ continuous as a function of $t$?"
Choose any $t_0 \in I$. It seems intuitive, since $h$ is continuous, that in some geometric sense we have
(I) $ A_t \rightarrow A_{t_0}$, and consequently that
(II) $\mu(A_t) \rightarrow \mu(A_{t_0})$,
which thus means that $g(t) \rightarrow g(t_0)$, in turn implying that $g$ is continuous.
The difficulty lies in capturing the geometric notion, (I), "measure-theoretically" so that we can assert (II).