Fixed non-python-2.6-compatible code in total records plugin