allow NULL in List() operation if we're just interested in the count