Using array.count instead of countElements(array).
Test cleanups.