How to determine the number of entries in a doctionary

Hi,

How can I get the number of nodes from this dictionary in Vagrant to use in an if statement?

LOADBALANCER_NODES = { ‘loadbalancer1’ => ‘172.16.16.2’,
‘loadbalancer2’ => ‘172.16.16.3’ }

Thanks!

Best,
Peter