Code:
$ cat file
id,name,id_2, success/failure
44,RAJ, 33, SUCCESS
40,JEY, 44,FAILURE
44,RAJ, 33, FAILURE
40,JEY, 44,FAILURE
40,JEY, 44,FAILURE
44,RAJ, 33,FAILURE
$ awk -F, 'NR==1{print}
NR>1{gsub(" ","",$0);A[$1","$2","$3]; B[$4] ; C[$1","$2","$3,$4]++}END{for(i in A){p=i; for(j in B){k+=C[i,j];p=p FS j "=" C[i,j]+0;} print p ",Total=" k;k=0}}' file
id,name,id_2, success/failure
40,JEY,44,FAILURE=3,SUCCESS=0,Total=3
44,RAJ,33,FAILURE=2,SUCCESS=1,Total=3