task: metadata: install: pip install -e .[dev]
patch: diff --git a/CHANGELOG.md b/CHANGELOG.md
index d494fc2..a9dc65d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,6 +40,8 @@ any parts of the framework not mentioned in the documentation should generally b
             return value.name
     ```
 
+* `SerializerMethodResourceRelatedField(many=True)` relationship data now includes a meta section.
+
 ### Fixed
 
 * Refactored handling of the `sort` query parameter to fix duplicate declaration in the generated schema definition
diff --git a/rest_framework_json_api/renderers.py b/rest_framework_json_api/renderers.py
index f766020..9a0d9c0 100644
--- a/rest_framework_json_api/renderers.py
+++ b/rest_framework_json_api/renderers.py
@@ -19,6 +19,7 @@ import rest_framework_json_api
 from rest_framework_json_api import utils
 from rest_framework_json_api.relations import (
     HyperlinkedMixin,
+    ManySerializerMethodResourceRelatedField,
     ResourceRelatedField,
     SkipDataMixin,
 )
@@ -152,6 +153,11 @@ class JSONRenderer(renderers.JSONRenderer):
                 if not isinstance(field, SkipDataMixin):
                     relation_data.update({"data": resource.get(field_name)})
 
+                    if isinstance(field, ManySerializerMethodResourceRelatedField):
+                        relation_data.update(
+                            {"meta": {"count": len(resource.get(field_name))}}
+                        )
+
                 data.update({field_name: relation_data})
                 continue
 

problem_statement: SerializerMethodResourceRelatedField does not include meta section in relationship response.
`SerializerMethodResourceRelatedField` does not include a meta section in the relationship response like `ResourceRelatedField` does. This doesn't make sense, because `SerializerMethodResourceRelatedField` extends `ResourceRelatedField` and both seem to return every related record in the response (for the record I've only tried with a little over a thousand related records).

So for example if you had an ObjectA with a has many relationship with ObjectB:

```python
    objectbs = SerializerMethodResourceRelatedField(
        source='get_objectbs',
        many=True,
        model=ObjectB,
        read_only=True
    )

    def get_objectbs(self, obj):
        return ObjectB.objects.filter(objecta=obj)
```

then your response would look like:

```json
"relationships": {
  "objectb": {
   "data": [...]
  }
}
```

instead of:

```json
"relationships": {
  "objectb": {
    "meta": {
      "count": 2
    },
   "data": [...]
  }
}
```
repo: django-json-api/django-rest-framework-json-api
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/example/tests/integration/test_non_paginated_responses.py b/example/tests/integration/test_non_paginated_responses.py
index 60376a8..92d26de 100644
--- a/example/tests/integration/test_non_paginated_responses.py
+++ b/example/tests/integration/test_non_paginated_responses.py
@@ -51,6 +51,7 @@ def test_multiple_entries_no_pagination(multiple_entries, client):
                             "related": "http://testserver/entries/1/suggested/",
                             "self": "http://testserver/entries/1/relationships/suggested",
                         },
+                        "meta": {"count": 1},
                     },
                     "suggestedHyperlinked": {
                         "links": {
@@ -106,6 +107,7 @@ def test_multiple_entries_no_pagination(multiple_entries, client):
                             "related": "http://testserver/entries/2/suggested/",
                             "self": "http://testserver/entries/2/relationships/suggested",
                         },
+                        "meta": {"count": 1},
                     },
                     "suggestedHyperlinked": {
                         "links": {
diff --git a/example/tests/integration/test_pagination.py b/example/tests/integration/test_pagination.py
index 4c60e96..1a4bd05 100644
--- a/example/tests/integration/test_pagination.py
+++ b/example/tests/integration/test_pagination.py
@@ -51,6 +51,7 @@ def test_pagination_with_single_entry(single_entry, client):
                             "related": "http://testserver/entries/1/suggested/",
                             "self": "http://testserver/entries/1/relationships/suggested",
                         },
+                        "meta": {"count": 0},
                     },
                     "suggestedHyperlinked": {
                         "links": {
diff --git a/example/tests/test_filters.py b/example/tests/test_filters.py
index ab74dd0..87f9d05 100644
--- a/example/tests/test_filters.py
+++ b/example/tests/test_filters.py
@@ -512,6 +512,7 @@ class DJATestFilters(APITestCase):
                                 {"type": "entries", "id": "11"},
                                 {"type": "entries", "id": "12"},
                             ],
+                            "meta": {"count": 11},
                         },
                         "suggestedHyperlinked": {
                             "links": {