SELECT COUNT ( * ) FROM `AuditSchedule_Application` AS `a` WHERE ( ( ( ( `a` . `UserId` = ? ) AND ( `a` . `AuditId` = ? ) ) AND ( `a` . `ScheduledId` = ? ) ) AND NOT ( `a` . `IsDeleted` ) ) AND `a` . `IsActive` 