At the top of my head, I would all the arrays to an array and count the number of arrays of which #type is 'button' or 'submit'.
I'm using hook_field_extra_fields() to add some buttons to a node. If there is more than one button, I want to enclose them in a wrapper for theme placement. So far, I'm drawing a blank on how to do this.
--
[ Drupal support list | http://lists.drupal.org/ ]