Determining the degeneracy of the term symbols