New script done for quantification of occurences, next will be testing and debugging the script and functions