A brute force approach---for validating future results:
+ Generate the valid lists of indices lexicographically, i.e., {0, 0, ..., 0}, {0, 0, ..., 1}, ..., {0, 0, ..., |A_n|}, {0, 0, ..., 1, 0}, {0, 0, ..., 1, 1}, ..., {|A_0|, |A_1|, ..., |A_n|}, which can be done incrementally, one by one;
+ Filter the generated lists, selecting only the valid sandwiches;
+ Count the number of filtered lists.
L = {{1, 5, 7, 10}, {2, 6, 6, 8, 12}, {4, 5, 9}};
ArrayRange[s__] := Table[L[[i, List[s][[i]]]], {i, Length@L}];
ValidSandwich[s__] := {Ordering[ArrayRange[s]] == Range[Length@L], List[s]};
sandwiches = Flatten[Outer[ValidSandwich, Sequence @@ (Range[#] & /@ Length /@ L)], 2];
sandwiches = #[[2]] & /@ Select[%, #[[1]] &];
Table[L[[i, #[[i]]]], {i, Length@L}] & /@ %
sandwiches - 1
Length@%
{{1, 2, 4}, {1, 2, 5}, {1, 2, 9}, {1, 6, 9}, {1, 6, 9}, {1, 8, 9}, {5, 6, 9}, {5, 6, 9}, {5, 8, 9}, {7, 8, 9}}
{{0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 1, 2}, {0, 2, 2}, {0, 3, 2}, {1, 1, 2}, {1, 2, 2}, {1, 3, 2}, {2, 3, 2}}
10