code: public static Number count(Object[] self, Object value) {
          return count((Iterable)Arrays.asList(self), value);
      }
docs: Counts the number of occurrences of the given value inside this array.
  Comparison is done using Groovy's == operator (using
  <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
  
  @param self  the array within which we count the number of occurrences
  @param value the value being searched for
  @return the number of occurrences
  @since 1.6.4