Fixed retrieval for total_count