libvirt_get_domain_count Get the number of all domains
&reftitle.description; Integer libvirt_get_domain_count resource connection

Get the number of active and inactive domains.

&reftitle.parameters;

connection

  Connection resource of hypervisor.

&reftitle.returnvalues;

Number of active and inactive domains. The result is the same as `libvirt_get_inactive_domain_count`+`libvirt_get_active_domain_count`.

&reftitle.examples;

`libvirt_get_domain_count`,`libvirt_get_active_domain_count` and `libvirt_get_inactive_domain_count` example

Get count of all, active and inactive domains.

    <?php

    	echo ("Domain count: Active ".libvirt_get_active_domain_count($conn).",Inactive ".libvirt_get_inactive_domain_count($conn).", Total ".libvirt_get_domain_count($conn)."\n");

    ?>

&example.outputs.similar;

    Domain count: Active 1,Inactive 6, Total 7

&reftitle.seealso;

- `libvirt_get_active_domain_count`
- `libvirt_get_inactive_domain_count`