In general, two door cars are considered as coupe and four doors as sedan. But there are two doors sedan also and four door coupe too.

So, the basic difference is not the number of doors but the interior volume or space. The SAE ( Society of Automotive Engineers) has standarizes  the two types according to their interior volume. The coupe =< 33 cubic feet and sedan>= 33 cubic feet.

Some people even think that they are differentiated by whether the car has a hatchback rear. It is true for many coupe but not to all so, generalizing it does not make any sense.