public static function count($data = false) {

        if ($data && Validate::isArray($data)) {

            return count($data);
        } else if ($data && Validate::isObject($data)) {

            return count(get_object_vars($data));
        }

        return 0;
    }
public static function count($data = false) {

        if ($data && Validate::isArray($data)) {

            return count($data);
        } else if ($data && Validate::isObject($data)) {

            return count(get_object_vars($data));
        }

        return 0;
    }
public static function count ( $ data = false ) { if ( $ data && Validate :: isArray ( $ data ) ) { return count ( $ data ) ; } else if ( $ data && Validate :: isObject ( $ data ) ) { return count ( get_object_vars ( $ data ) ) ; } return 0 ; }
Count the numbers of keys in a given array or object.
@param array || object
@return int numbers of keys
Count the numbers of keys in a given array or object .