For symplectic Lie algebras $mathfrak{sp}(2n,mathbb{C})$, denote by $mathfrak{b}$ and $mathfrak{n}$ its Borel subalgebra and maximal nilpotent subalgebra, respectively. We construct a relationship between the abelian ideals of $mathfrak{b}$ and the cohomology of $mathfrak{n}$ with trivial coefficients. By this relationship, we can enumerate the number of abelian ideals of $mathfrak{b}$ with certain dimension via the Poincare polynomials of Weyl groups of type $A_{n-1}$ and $C_n$.