I don't really understand what you're asking but if you mean
$_images[1] = 'image1.jpg';
$_images[2] = 'image2.jpg';
$_images[3] = 'image3.jpg';
$_images[4] = 'image4.jpg';
Then just do echo count($_images);
If you mean
$images[1] = 'image1.jpg';
$images[2] = 'image2.jpg';
$images[3] = 'image3.jpg';
$images[4] = 'image4.jpg';
$_images = array();
array_push($_images, $images); //array of arrays
then do
echo count($_images, COUNT_RECURSIVE) - 1; //keep in mind your parent array must only have 1 array inside it, or you have to do -x where x = number of your second-level arrays
If you mean something else, then you have to explain more...