using System.Collections.Generic;
public static void Main()
var categoryArrays = new List<List<string>> {
new List<string> {"one-one", "one-two"},
new List<string> {"two-one"},
new List<string> {"three-one", "three-two", "one-two"},
new List<string> {"two-one"}
var categoriesList = categoryArrays.Where(a => a != null && a.Any()).SelectMany(a => a).Distinct().OrderBy(c => c).ToList();
Console.WriteLine($"{categoriesList.Count} categories");