Implemented Array.count(…) which mirrors Python's list.count(…).