CREATE PROC p_rowcounts
@Date1 datetime = NULL
, @Date2 datetime = NULL
IF @Date1 IS NULL SET @Date1 = GetDate()
IF @Date2 IS NULL SET @Date2 = DateAdd(month, -6, Convert(CHAR(10), @Date1, 121))
Count (*) AS 'Number of Rows'
, Convert(DATETIME, Convert(CHAR(10), ModifyTime, 121)) AS Date
FROM Table1 (nolock)
WHERE ModifyTime BETWEEN @Date2 AND @Date1
GROUP BY Convert(CHAR(10), ModifyTime, 121)
That query ought to give one count per day in the range. I think you're hinting that you'd like to see rows with zeros for a count for days with no data, which I see as wasteful and poor practice.
If you have code that relies on zeros, you can certainly go to added trouble to make the zeros appear, but in my mind you'd be much better off to fix the code instead of writing SQL to cater to the problems in it.