Hi @jeffelizaga
That’s because WP_Query will return not only the posts but also other things related to the query. You can debug the $team
variable if you want. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/debug/.
I believe you can get the total posts count by using this code:
$max_li = $team->post_count;
Please learn more about WP_Query here: https://codex.wordpress.org/Class_Reference/WP_Query.
I hope this helps.