Allow casting arrays to ICollection, implement .Count

Fixes #237