In ruby code, back-end if is used in such case:
```ruby
output[key_prefix + 'num'] = count[:num] if count[:num]
```
This is also for L127-129.