RFC 7208 caps at 10 the terms that cause a DNS query: include, a, mx, ptr, exists and redirect. Ip4, ip6 and all do not count, but each include counts plus whatever lookups exist inside it. Above 10 the result is a PermError and the whole SPF is ignored. There is also a limit of 2 void lookups, queries that return nothing. Use Count real lookups to follow the chain and see the total.