Hi,
you can use the following for your purpose
create table test (fromDate datetime, Todate DateTime)
insert into test values('15-july-2013','16-july-2013')
insert into test values('1-july-2013','10-july-2013')
select *,DATEDIFF(day,fromDate,Todate)+1 as LeavesBetweenRangefrom test
I have added +1 because i am including both the days when counting no. of leaves