Fix inconsistencies in stats count (bug 1014752)