For symplectic Lie algebras sp(2n,C), denote by b and n its Borel subalgebra and maximal nilpotent subalgebra, respectively. We construct a relationship between the abelian ideals of b and the cohomology of n with trivial coefficients. By this relationship, we can enumerate the number of abelian ideals of b with certain dimension via the Poincaré polynomials of Weyl groups of type An−1 and Cn.