On complexity of metric spaces