Implemented a Caculate Degree Count Problem