Changed getNumItemsSQL