Here are the tables:
CREATE TABLE [dbo].[Classes]( [ClassId] [int] NOT NULL, [ClassName] [nvarchar](50) NOT NULL, CONSTRAINT [PK_Classes] PRIMARY KEY CL
You mean something like this?
SELECT C.[ClassName], COUNT(*) AS 'Number of Students' FROM [dbo].[Classes] AS C INNER JOIN [dbo].[Students] AS S ON S.[ClassId] = C.[ClassId] GROUP BY C.[ClassName]