I found why it is 5.
for schedule to be serial. r1(A) & w1(B) must be together.
Similarly r2(A) & w2(B) must be together
Similarly r3(A) & w3(B) must be together
Similarly r4(A) & w4(B) must be together
Now w4(B) must be last one to write B.
But we can order T1, T2 &T3 in any order. 3! =6
So 6 is number of serial schedule (It is not view serial schedule , as for view serial we have to fix r1(A) also )
from this we have to subtract conflict equal schedule.
To find number of conflict equal schedule draw dependency graph like.
T1 must precede T2,T3&T4 hence there is edge from T1 to T2,T3&T4
T2 must precede T3 & T4 hence there is edge from T2 to T3 & T4
T3 must precede T4 . Hence there is edge from T3 to T4.
Now find topological path from T1 to T4 {that must include all four transaction}
There only one such path i.e. T1->T2->T3->T4
hence 6-1 =5
please reply if you find something wrong in answer