THERE ARE 40 STUDENTS IN MY CLASS.  MY CLASS HAS 40 STUDENTS.

46. There are 40 students in my class.

 My class has 40 students.