anatomy
Most intercostal muscles attach to two ribs, one above and one below. And each type of intercostal muscle has a specific location between those ribs.
External intercostal muscles (11 pairs). These are the frontmost of the intercostal muscles.
Internal intercostal muscles (11 pairs). These are right behind the external intercostal muscles but you only have them at the front of your body.
Innermost intercostal muscles. This muscle layer attaches to the rear surface of both ribs and may skip ribs.