short answer: both are correct.
Long answer: Usage varies depending on the school, the individual and sometimes the country. Generally speaking, a series of lessons make up a class. For example, each semester there with be 10 lessons for the Math Class. But if you say we have 10 math classes together, people will still understand what you’re saying. Which leads me back to my short answer: they are interchangeable.