abstract getting num_items
removed extra square brackets