  In this paper, we introduce and study the notion of cointegrals in a weak
multiplier Hopf algebras $(A, \Delta)$.
  A cointegral is a non-zero element $h$ in the multiplier algebra $M(A)$ such
that $ah=\v_t(a)h$ for any $a\in A$. When $A$ has a faithful set of cointegrals
(now we call $A$ of {\it discrete type}), we give a sufficient and necessary
condition for existence of integrals on $A$. Then we consider a special case,
i.e., $A$ has a single faithful cointegral, and we obtain more better results,
such as $A$ is Frobenius, quasi-Frobenius, et al. Moreover when an algebraic
quantum groupoid $A$ has a faithful cointegral, then the dual $\widehat{A}$
must be weak Hopf algebra. In the end, we investigate when $A$ has a cointegral
and study relation between compact and discrete type.
