That's not a stored procedure: that is C# code and stroed procedures are written in SQL, because that is where they are executed.
This is a stored procedure:
ALTER PROCEDURE [dbo].[spCountEpisodes]
SET NOCOUNT ON;
SELECT a.Name, b.EpCount
FROM Serials a
(SELECT SerialId, Count(SerialNo) AS EpCount
FROM Episode GROUP BY SerialId) AS b
ON a.Id = b.SerialId
Your second example executes a stored procedure and uses it to fill a DataSet - but we have no idea what the SP does, how it does it, what data you pass to it in the parameters, or what your database contains.
So start with the debugger and look at the parameter values. then use SSMS to look inside your Db at the SP and your database table content to find out what it should be returning.
Sorry, but we can't help you with that!