python count list items condition