get_item_count

Just a function that I had to use in my latest project, might be helpful to others?