in reply to Re^3: Length of multidimensional array based on the particular index valuein thread Length of multidimensional array based on the particular index value
And since $_->[2] is either 0 or 1 you could do:
$length+=$_->[2] for @select; [download]