please help me for optimise sql function : 
(@PaymentId int) 
returns int
as
begin
	
	Declare @viewedCount int
	
	Select @viewedCount=Count(OtSrno) From OtTendersViewDetail 
	Where OTPaymentId=@PaymentId And OTPaymentId is not null
	
	return (@viewedCount)
	
end