Make $len() work with empty list and list with single item