implemented and added new array algorithm

- get number of occurrences