A recursive_count_if Function with Automatic Type Deducing from Lambda for Various Type Arbitrary Nested Iterable Implementation in C++
Don't try to deduce the predicate's parameter type
As Quuxplusone mentioned in the comments of the predecessor question, you should not try to determine the type of the predicate function's parameter, this is bound to fail. And indeed the problem immediately starts when you look at your predicate:
auto size5 = [](std::string s) { return s.size() == 5; };

And think: hey, that's making a copy of s, I should pass that by const reference instead:
auto size5 = [](const std::string &amp;s) { return s.size() == 5; };

Now it fails the requires clauses of your functions. You might be able to add some more tricks to cast away cv-qualifiers and references before comparing the types with std::same_as, but that does not cover all possible situations either. For example, I could write a lambda which allows any type of std::basic_string to be checked:
auto size5 = []&lt;typename T&gt;(std::basic_string&lt;T&gt; s) { return s.size() == 5; };

As I suggested in the comments, you just want to write a concept that checks if the predicate can be applied to the argument it is fed, you don't need to check the types themselves. Here is a possible implementation:
template&lt;typename Pred, typename T&gt;
concept is_applicable_to_elements = requires(Pred predicate, const T &amp;container)
{
    predicate(*container.begin());
};

template&lt;class T1, class T2&gt; requires is_applicable_to_elements&lt;T2, T1&gt;
auto recursive_count_if(const T1&amp; input, const T2 predicate)
{
    return std::count_if(input.begin(), input.end(), predicate);
}

template&lt;class T1, class T2&gt;
auto recursive_count_if(const T1&amp; input, const T2 predicate)
{
    return std::transform_reduce(std::begin(input), std::end(input), std::size_t{}, std::plus&lt;std::size_t&gt;(), [predicate](auto&amp; element) {
        return recursive_count_if(element, predicate);
    });
}

Note that since all the templates used is_iterable(), you can remove that requirement, although if you keep it you get nicer error messages if you accidentily try to apply recursive_count_if() on something that does not support iterating over.