We had the same problem after upgrade to v1.18.2, but fixed it with:
https://forum.osticket.com/d/102257-incorrect-ticket-count-in-custom-queue/8
https://forum.osticket.com/d/106244-pagination-showing-incorrect-ticket-count-in-search-results/13
After upgrade to v1.18.3 problem reappeared..
Diff of fixed version from 1.18.2 of class.search.php and class.search.php from 1.18.3:
374,378c374,375
< // Sanitize query to avoid possible SQL injection via parameter markers
< // This regex matches one or more colons followed by one or more digits,
< // and then replaces the match with only the digits (i.e. stripping the colon(s)).
< $query = preg_replace('/:+(\d+)/', '$1', $query);
<
---
> // Strip colon (:num) to avoid possible params injection
> $query = preg_replace('/:(\d+)/i', '$1', $query);
477c474
< $class = get_class($this);
---
> $class = get_class();
911,914c908
< $query->filter(Q::any([
< 'ticket_pid__isnull' => true,
< 'flags__hasbit' => Ticket::FLAG_LINKED
< ]))->limit(false)->offset(false)->order_by(false);
---
> $query->limit(false)->offset(false)->order_by(false);
It look's like a problem is somewhere else this time..??
Any suggestions?