Added getDeviceCount and tests.
4 files changed