Count Function with Aggregate function inside the query
Put the first select in a subquery or a common table expression (shown below)

WITH cte (TicketID, CreatedMoment, StatusChangeTime)
AS (
    SELECT M.TicketID,
           M.CreatedMoment,
           MAX(L.StatusChangeMoment) AS StatusChangeTime
    FROM XX_MASTER_TICKETS AS M
    LEFT JOIN XX_DETAIL_TICKET_STATUS_LOG AS L ON M.RowID = L.TicketRowID
    WHERE M.CreatedMoment BETWEEN {d '2014-08-23'} AND {d '2014-08-26'}
    GROUP BY M.TicketID,
             M.CreatedMoment
   )

SELECT CAST(CreatedMoment AS date) AS [Date],
       SUM((CASE WHEN DATEDIFF(minute, CreatedMoment, StatusChangeTime)&lt;60*24 THEN 1 ELSE 0 END)) AS below24Hrs,
       SUM((CASE WHEN DATEDIFF(minute, CreatedMoment, StatusChangeTime)&gt;=60*24 THEN 1 ELSE 0 END)) AS above24Hrs
FROM cte
GROUP BY CAST(CreatedMoment AS date)
ORDER BY 1;


The common table expression returns a list of TicketID, CreatedMoment and MAX(StatusChangeMoment). Using this result set, we can apply a second aggregate in the SELECT statement below. What I'm doing there is a conditional SUM(). I'm adding 1 for each row that meets the criteria and 0 for each row that doesn't.

NB: I've simplified your criteria a bit, I hope it's equivalent to what you're looking for.