Fix count discussion query for 2.2 compat