GuttenPlag Wiki
#!/usr/bin/env python
# -*- coding: ascii -*-

with open('zeilenanzahl.txt', 'r') as f:
        total_normal = 0
        total_footnote = 0
        for line in f:
                parts = line.strip().split(':')
                assert len(parts) == 4
                if parts[2]:
                        for x in parts[2].split(','):
                                total_normal += int(x)
                if parts[3]:
                        for x in parts[3].split(','):
                                total_footnote += int(x)
        print total_normal
        print total_footnote
        print total_normal + total_footnote