> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replyke.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch following count by user ID

> Get the following count for any user by their ID

## Overview

Returns a function that fetches the total count of users that a given user follows. This is a public endpoint — authentication is not required.

## Usage Example

```tsx theme={null}
import { useFetchFollowingCountByUserId } from "@replyke/react-js";

function UserStats({ userId }: { userId: string }) {
  const fetchFollowingCountByUserId = useFetchFollowingCountByUserId();
  const [count, setCount] = useState<number | null>(null);

  useEffect(() => {
    fetchFollowingCountByUserId({ userId }).then((res) => setCount(res.count));
  }, [userId]);

  return <span>{count ?? "..."} following</span>;
}
```

## Parameters

The hook returns a function. That function accepts:

<ParamField path="userId" type="string" required>
  The ID of the user whose following count to fetch.
</ParamField>

## Returns

<ResponseField name="count" type="number">
  Total number of users that the specified user is following.
</ResponseField>

## Related

* [useFetchFollowingCount](/hooks/follows/use-fetch-following-count) — get count for the current user
* [useFetchFollowingByUserId](/hooks/follows/use-fetch-following-by-user-id) — fetch the full list
