[post_stats] Python 3 compatibility

In Python 3, `filter()` returns an iterator instead of a list, which causes an error on line 42: "object of type 'filter' has no len()". Using a list comprehension fixes this, and is probably a little more readable.
Merge pull request #234 from Schnouki/patch-2

[post_stats] Python 3 compatibility