Fix total_count retrival