Hi Kumaran,
Your requirement can be achieved in BEx.
1) Convert Plant into KF by using a Formula Variable(Replacement Path)
2) Create RKF1 with Plant = P1 and Create RKF2 with Plant = P2
3) Convert both Creation date and System date into KFs by Formula Variable
4) Finally use below formula :--
( ( ( RKF1 ) LOGICAL OR ( RKF2 ) ) * ((Creation Date KF) - (System Date KF) ) < = 10 ) * (Total Num of Plants KF) + 0
Regards,
Suman