Código PHP:
//Calculo el numero total de enlaces
$total_enlaces=1;
while ( !empty($enlace[$total_enlaces+1]) ) {
$total_enlaces++;
}
Para eso existe la funcion count.
Código PHP:
<?php
echo count($enlace); //Imprime 3.
//o tambien esta sizeof($enlace);
?>