you have 10 fish and 3 died (must not have been taking very good care of them ?), but it didnt say that you cleaned them out ...
so you still have 10 fish in the tank
8 more got put in, so 10 + 8 = 18 fish
2 died but you STILL didnt take them out, so you have 18 fish in the tank now.