int countWhere(bool Function(T element) test) { try { return where(test).length; } catch (_) { return 0; } }