elem_count went to recursion