# Deactivate count response is returning 500 or 404

**URL:** https://community.forestadmin.com/t/deactivate-count-response-is-returning-500-or-404/5041
**Category:** Help me!
**Created:** [August 2, 2022, 7:21pm UTC](https://community.forestadmin.com/t/deactivate-count-response-is-returning-500-or-404/5041 "2022-08-02T19:21:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jong](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jong](https://community.forestadmin.com/u/jong)
#### Post date: [August 2, 2022, 7:21pm UTC](https://community.forestadmin.com/t/deactivate-count-response-is-returning-500-or-404/5041/1 "2022-08-02T19:21:11Z")

</div>

## Feature(s) impacted

Hello, I’ve tried using the deactivate\_count\_response from [Performance | Developer Guide](https://docs.forestadmin.com/documentation/reference-guide/performance#disable-pagination-count). Unfortunately, I’ve encountered some problems (screenshot attached).

When I have the get in the routes.rb (get ‘/Patient/count’, to: ‘patient#count’ - also tried patients#count but also didn’t work), I get a 404 error and didn’t seem to have worked. I tried removing the get from the routes.rb file but it seems to still try calling the count function and gives 500 error.

 ![Screen Shot 2022-08-02 at 11.17.30 AM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/44960b27cb0e3d2b3165a7cf00b9197138f20da4.png)

## Observed behavior

Still unable to provide search results using the search box even when record exists

## Expected behavior

Speed up searching without timing out

## Failure Logs

- Attached screenshot

## Context

- Project name: Hint Health
- Team name: Hint Health
- Environment name: James Local
- Agent type & version: Latest version
- Recent changes made on your end if any: N/A

---

<div class="post-metadata">

### Author: ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)
#### Post date: [August 3, 2022, 6:56am UTC](https://community.forestadmin.com/t/deactivate-count-response-is-returning-500-or-404/5041/2 "2022-08-03T06:56:38Z")

</div>

Hey @jong 👋

Deactivating count query is a feature that was introduced in `forest-rails@7.6.1`. Looking at your project configuration on my end, the environment “James local” does not run a forest-rails version that is compatible with this feature.

Could you eventually try to upgrade and test again in your configuration?

Thanks in advance 🙏
