How to get number of properties in an associative array?

Umm, how do you get the length of, or number of properties in, an associative array/dynamic object?

Thanks!