Let $ M $ be a real submanifold of an almost complex manifold $ (\overline{M},\overline{J}) $ and let $ H_{x}=T_{x}M\cap \overline{J}(T_{x}M) $ be the maximal holomorphic subspace, for each $ x\in M $. We prove that $ c\:M\rightarrow \mathbb{N} $, $ c(x)=\dim _{\mathbb{R}} H_{x} $ is upper-semicontinuous.