Fix subscriptions count query