• (1) This information is already stored in sysjobhistory in msdb.

    (2) Use the COUNT agrregrate function.

    If you need more detailed help than that, please specify your exact requirement, including table DDL, sample data and expected results.

    John