---
name: "vcount"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/count_dev/9freebsd"
---

# vcount(9freebsd)

get total number of references to a device

Part of [count\_dev(9freebsd)](/count_dev/9freebsd.md).

## NAME

**vcount**, **count\_dev** – get total number of references to a device

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/time.h\>**

**#include \<sys/conf.h\>**

**#include \<sys/vnode.h\>**

*int*\

**vcount**(*struct vnode \*vp*);

*int*\

**count\_dev**(*struct cdev \*dev*);

## DESCRIPTION

**vcount**() is used to get the number of references to a particular device. It allows for the fact that multiple vnodes may reference the same device. **count\_dev**() does the same thing as **vcount**(), but takes a *struct cdev* rather than a *struct vnode* pointer as an argument.

## RETURN VALUES

**vcount**() and **count\_dev**() both return the number of references to the device.

## SEE ALSO

[VFS(9)](/VFS/9.md), [vnode(9)](/vnode/9.md)

## AUTHORS

This manual page was written by Andrew Stevenson.
