```ruby
module Api
  class SearchController < BaseController
    before_action :authenticate_user!
    respond_to :json

    expose(:neurons) {
      NeuronSearch.new(
        q: params[:query]
      ).results
       .send('active')
       .page(params[:page]).per(8)
    }

    def index
      respond_with(
        neurons,
        meta: {
          total_items: neurons.count
        },
        each_serializer: Api::NeuronSerializer
      )
    end

    api :GET,
        "/search",
        "returns search from query"
    param :page, Integer
    param :query, String
  end
end
```

Use total_count instead of count
user
```ruby
module Api
  class SearchController < BaseController
    before_action :authenticate_user!
    respond_to :json

    expose(:neurons) {
      NeuronSearch.new(
        q: params[:query]
      ).results
       .send('active')
       .page(params[:page]).per(8)
    }

    def index
      respond_with(
        neurons,
        meta: {
          total_items: neurons.total_count
        },
        each_serializer: Api::NeuronSerializer
      )
    end

    api :GET,
        "/search",
        "returns search from query"
    param :page, Integer
    param :query, String
  end
end
```
assistant