You need to read up how hard disk partitions work and this
is a good start because lot of explanation is needed here.
The 4 primary partitions is PC standard.
In Linux the maximum partition number that can be reached is 63 for Pata disk and 15 for Sata disk. Old distro like Red Hat only support up to 15 or 16. I have Fedora C3 installed in hda59 and Fedora C5 in hdc56.
If you can't make empty space join up with a partition it is mostly due to the empty area is not immediately adjacent to the parttition. Also logical partition must work as a continuous chain with one logical partition carries the address for the next one down or up the chain. All logical partitions must be surround by a border called the extended partition, which itself has no storage space. Only one extended partition is allowed in PC standard and it must come at the expense of giving up one of the 4 primary partitions. In Linux hda1 to hda4 are reserved names for primary partitions. Logical partitions always starts from the 5th position. If you want to increase the size of hda5 you need to destroy its border first (the extended partition) and shift the logical partitions to aborb the empty space which must join either at the begining or at the end.
Hope the above isn't too complicated.