Grazie della risposta,
funziona ... ma con if(count(array) == 1) e non con if(count(array) > 1)