redo of PR: Added Arr::count() helper (refs #4516)