Tree.

size(map)

Returns the number of objects in the given map-like object.

$ ori capitals.yaml
Japan: Tokyo
Turkey: Ankara
Australia: Canberra
Spain: Madrid
$ ori Tree.size capitals.yaml
4