Php Count Different Values In Array Python Memory