Is it possible to emulate the WITH command in MySQL 5.1.73?
Yes, it is possible to return both results without repeating the subquery by rewriting your query using an outer join. The following will return same results as your version:

SELECT
    COUNT(*) AS `count`
FROM
    agreements AS ag
LEFT JOIN
    (
        SELECT
            a.driv_id, a.veh_id
        FROM
            agreements a
        INNER JOIN
            types t
            ON
            a.agreement_type_id = t.id
        WHERE
            DATE_ADD(a.start_date,INTERVAL t.initial_term YEAR) &lt; DATE_SUB(STR_TO_DATE('14-01-2015','%d-%m-%Y'),INTERVAL 2 MONTH)
    ) AS s ON ag.driv_id = s.driv_id AND ag.veh_id = s.veh_id
WHERE
    ag.start_date &gt;= STR_TO_DATE('14-01-2015','%d-%m-%Y')
    AND
    ag.start_date &lt; STR_TO_DATE('15-01-2015','%d-%m-%Y')
    AND
    ag.active = 1
    AND
    s.driv_id IS NULL
;


That would effectively be your not_in_sum. In order to return both counts at once, you just remove the NULL check from the where clause and use COUNT(s.driv_id) in SELECT like this:

SELECT
    COUNT(s.driv_id) AS in_sum,
    COUNT(*) - COUNT(s.driv_id) AS not_in_sum
FROM
    ...


If the subquery can return duplicates, add DISTINCT to it, otherwise in_sum may return an incorrect result.

As for the WITH clause, there is no mention of it even in the manual for the not yet officially released version 5.7, but using a temporary table to emulate it would probably make sense. The error you got while trying that method was because the right side of IN/NOT IN in your attempts was just a table name whereas it should have been a subquery:

(a.driv_id, a.veh_id) IN (SELECT driv_id, veh_id FROM tuples)