How do you know what size of engine is in a car that has had the engine changed?

the only sure way is to remove the cylinder head and measure the diameter of the piston cylinder muliplied by the length of the piston stroke(how far it travels from bottom to top) this will give you the cubic inch (or cubic centimeters depending what country your are in) of ONE cylinder multiply that by the number of cylinders to give the total engine displacment (Size).