Here are the tables:
CREATE TABLE [dbo].[Classes]( [ClassId] [int] NOT NULL, [ClassName] [nvarchar](50) NOT NULL, CONSTRAINT [PK_Classes] PRIMARY KEY CL
select c.ClassId,C.ClassName,COUNT(*) [Number of students] from Classes C,Students S where c.ClassId=S.ClassId group by C.ClassId,C.ClassName