public static int CountNumberOfSInName(string name) { if (name == null) { throw new ArgumentNullException(nameof(name)); } return name.Count(c => char.ToLower(c).Equals('s')); }