How about this instead:
```python
context['table'][buildid] = collections.defaultdict(int)
context['table'][buildid]['total'] += 1
context['table'][buildid][os_name] += 1
```