Let S be a connected closed oriented surface of genus g. Given a triangulation (resp. quadrangulation) of S, define the index of each of its vertices to be the number of edges originating from this vertex minus 6 (resp. minus 4). Call the set of integers recording the non-zero indices the profile of the triangulation (resp. quadrangulation). If kappa is a profile for triangulations (resp. quadrangulations) of S, for any m is an element of Z(>0), denote by T (kappa, m) (resp. Q(kappa, m)) the set of (equivalence classes of) triangulations (resp. quadrangulations) with profile kappa which contain at most m triangles (resp. squares). In this paper, we will show that if kappa is a profile for triangulations (resp. for quadrangulations) of S such that none of the indices in kappa is divisible by 6 (resp. by 4), then T (kappa, m) similar to c(3)(kappa)m(2g+vertical bar kappa vertical bar-2) (resp. Q(kappa, m) similar to c(4)(kappa)m(2g+vertical bar kappa vertical bar-2)), where c(3)(kappa) is an element of Q . (root 3 pi)(2g+vertical bar kappa vertical bar-2) and c(4)(kappa) is an element of Q . pi(2g+vertical bar kappa vertical bar-2). The key ingredient of the proof is a result of J. Kollar [24] on the link between the curvature of the Hodge metric on vector subbundles of a variation of Hodge structure over algebraic varieties, and Chern classes of their extensions. By the same method, we also obtain the rationality (up to some power of pi) of the Masur-Veech volume of arithmetic affine submanifolds of translation surfaces that are transverse to the kernel foliation.