You can do the following:
Call A Begin event Screen Pop for Call A
Call A ConnectionCleared event Dismiss Call A's screen pop
Call B Begin event Screen Pop for Call B
This way,you dont need the call count
Use the CallConnectionCleared event instead of the EndCall event.