No - that's cheating. If you've not left the airport, you've not been to a country - you need to pass through immigration. Airports are basically no-mans land. You can travel through airports without any conditions, you don't need a visa to have a layover at most countries airports.