Add getNumberOfItems method