Fix delete query count on pg